unless muks screams too loudly, this will probably be the scheme for code formatting.

This commit is contained in:
Charles Kerr 2008-09-21 22:40:12 +00:00
parent d1a1ecace8
commit 07792efba0
1 changed files with 179 additions and 179 deletions

View File

@ -93,7 +93,7 @@ indent_member 0 # Number
# If set, will indent trailing single line ('//') comments relative
# to the code instead of trying to keep the same absolute column
indent_switch_case 1 # Number
indent_switch_case 4 # Number
# Spaces to indent 'case' from 'switch'
# Usually 0 or indent_columns.
@ -386,16 +386,16 @@ sp_sign Remove # { Ignore, Add, Remove, Force }
sp_incdec Remove # { Ignore, Add, Remove, Force }
# Add or remove space before or after '++' and '--', as in '(--x)' or 'y++;'
sp_after_oc_scope { Ignore, Add, Remove, Force }
Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;'
sp_before_oc_colon { Ignore, Add, Remove, Force }
Add or remove space after the colon in message specs
'-(int) f: (int) x;' vs '+(int) f : (int) x;'
sp_after_oc_type { Ignore, Add, Remove, Force }
Add or remove space after the (type) in message specs
'-(int) f: (int) x;' vs '+(int)f : (int)x;'
#sp_after_oc_scope { Ignore, Add, Remove, Force }
# Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;'
#
#sp_before_oc_colon { Ignore, Add, Remove, Force }
# Add or remove space after the colon in message specs
# '-(int) f: (int) x;' vs '+(int) f : (int) x;'
#
#sp_after_oc_type { Ignore, Add, Remove, Force }
# Add or remove space after the (type) in message specs
# '-(int) f: (int) x;' vs '+(int)f : (int)x;'
#
# Code alignment (not left column spaces/tabs)
@ -416,16 +416,16 @@ align_number_left True # { False, True }
align_func_params True # { False, True }
# Align variable definitions in prototypes and functions
align_var_def_span 0 # Number
align_var_def_span 10 # Number
# The span for aligning variable definitions (0=don't align)
#align_var_def_star_style 0 # Number
align_var_def_star_style 0 # Number
# How to align the star in variable definitions.
# 0=Part of the type
# 1=Part of the variable
# 2=Dangling
#
#align_var_def_amp_style 0 # Number
align_var_def_amp_style 0 # Number
# How to align the '&' in variable definitions.
# 0=Part of the type
# 1=Part of the variable
@ -437,7 +437,7 @@ align_var_def_span 0 # Number
#align_var_def_gap 4 # Number
# The gap for aligning variable definitions
#
#align_var_def_colon True # { False, True }
align_var_def_colon True # { False, True }
# Whether to align the colon in struct bit fields
#
#align_var_def_inline True # { False, True }
@ -449,28 +449,28 @@ align_assign_span 0 # Number
align_assign_thresh 0 # Number
# The threshold for aligning on '=' in assignments (0=no limit)
align_enum_equ_span 10 # Number
align_enum_equ_span 0 # Number
# The span for aligning on '=' in enums (0=don't align)
align_enum_equ_thresh 0 # Number
# The threshold for aligning on '=' in enums (0=no limit)
align_var_struct_span 0 # Number
align_var_struct_span 2 # Number
# The span for aligning struct/union (0=don't align)
align_var_struct_thresh Number
align_var_struct_thresh 50 # Number
# The threshold for aligning struct/union member definitions (0=no limit)
align_var_struct_gap Number
align_var_struct_gap 4 # Number
# The gap for aligning struct/union member definitions
align_struct_init_span Number
align_struct_init_span 4
# The span for aligning struct initializer values (0=don't align)
align_typedef_gap Number
#align_typedef_gap Number
# The minimum space between the type and the synonym of a typedef
align_typedef_span Number
#align_typedef_span Number
# The span for aligning single-line typedefs (0=don't align)
align_typedef_func 0 # Number
@ -535,28 +535,28 @@ align_mix_var_proto True # { False, True }
# Newline adding and removing options
#
nl_collapse_empty_body { False, True }
Whether to collapse empty blocks between '{' and '}'
nl_collapse_empty_body True # { False, True }
# Whether to collapse empty blocks between '{' and '}'
nl_assign_leave_one_liners { False, True }
Don't split one-line braced assignments - 'foo_t f = { 1, 2 };'
nl_assign_leave_one_liners True # { False, True }
# Don't split one-line braced assignments - 'foo_t f = { 1, 2 };'
nl_class_leave_one_liners { False, True }
Don't split one-line braced statements inside a class xx { } body
#nl_class_leave_one_liners { False, True }
# Don't split one-line braced statements inside a class xx { } body
nl_enum_leave_one_liners { False, True }
Don't split one-line enums: 'enum foo { BAR = 15 };'
nl_enum_leave_one_liners True # { False, True }
# Don't split one-line enums: 'enum foo { BAR = 15 };'
nl_getset_leave_one_liners { False, True }
Don't split one-line get or set functions
nl_getset_leave_one_liners True # { False, True }
# Don't split one-line get or set functions
nl_func_leave_one_liners { False, True }
Don't split one-line function definitions - 'int foo() { return 0; }'
nl_func_leave_one_liners True # { False, True }
# Don't split one-line function definitions - 'int foo() { return 0; }'
nl_if_leave_one_liners { False, True }
Don't split one-line if/else statements - 'if(a) b++;'
nl_if_leave_one_liners True # { False, True }
# Don't split one-line if/else statements - 'if(a) b++;'
nl_start_of_file Remvoe # { Ignore, Add, Remove, Force }
nl_start_of_file Remove # { Ignore, Add, Remove, Force }
# Add or remove newlines at the start of the file
#nl_start_of_file_min Number
@ -577,31 +577,31 @@ nl_assign_brace Ignore # { Ignore, Add, Remove, Force }
#nl_after_square_assign { Ignore, Add, Remove, Force }
# Add or remove newline after '= [' (D only). Will also affect the newline before the ']'
nl_func_var_def_blk Number
The number of newlines after a block of variable definitions
nl_func_var_def_blk 1 # Number
# The number of newlines after a block of variable definitions
#nl_fcall_brace { Ignore, Add, Remove, Force }
# Add or remove newline between a function call's ')' and '{', as in:
# list_for_each(item, &list) { }
nl_enum_brace Add # { Ignore, Add, Remove, Force }
nl_enum_brace Force # { Ignore, Add, Remove, Force }
# Add or remove newline between 'enum' and '{'
nl_struct_brace Add # { Ignore, Add, Remove, Force }
nl_struct_brace Force # { Ignore, Add, Remove, Force }
# Add or remove newline between 'struct and '{'
nl_union_brace Add # { Ignore, Add, Remove, Force }
nl_union_brace Force # { Ignore, Add, Remove, Force }
# Add or remove newline between 'union' and '{'
nl_if_brace Add # { Ignore, Add, Remove, Force }
nl_if_brace Force # { Ignore, Add, Remove, Force }
# Add or remove newline between 'if' and '{'
nl_brace_else Add # { Ignore, Add, Remove, Force }
nl_brace_else Force # { Ignore, Add, Remove, Force }
# Add or remove newline between '}' and 'else'
nl_elseif_brace { Ignore, Add, Remove, Force }
Add or remove newline between 'else if' and '{'
If set to ignore, nl_if_brace is used instead
nl_elseif_brace Force # { Ignore, Add, Remove, Force }
# Add or remove newline between 'else if' and '{'
# If set to ignore, nl_if_brace is used instead
nl_else_brace Add # { Ignore, Add, Remove, Force }
# Add or remove newline between 'else' and '{'
@ -627,32 +627,32 @@ nl_else_brace Add # { Ignore, Add, Remove, Force }
#nl_brace_catch { Ignore, Add, Remove, Force }
# Add or remove newline between '}' and 'catch'
nl_while_brace { Ignore, Add, Remove, Force }
Add or remove newline between 'while' and '{'
nl_while_brace Force # { Ignore, Add, Remove, Force }
# Add or remove newline between 'while' and '{'
nl_do_brace { Ignore, Add, Remove, Force }
Add or remove newline between 'do' and '{'
nl_do_brace Force # { Ignore, Add, Remove, Force }
# Add or remove newline between 'do' and '{'
nl_brace_while { Ignore, Add, Remove, Force }
Add or remove newline between '}' and 'while' of 'do' statement
nl_brace_while Force # { Ignore, Add, Remove, Force }
# Add or remove newline between '}' and 'while' of 'do' statement
nl_switch_brace Add { Ignore, Add, Remove, Force }
nl_switch_brace Force { Ignore, Add, Remove, Force }
# Add or remove newline between 'switch' and '{'
nl_multi_line_cond { False, True }
Add or remove newline when condition spans two or more lines
#nl_multi_line_cond { False, True }
# Add or remove newline when condition spans two or more lines
nl_multi_line_define { False, True }
Force a newline in a define after the macro name for multi-line defines.
nl_multi_line_define True # { False, True }
# Force a newline in a define after the macro name for multi-line defines.
nl_before_case { False, True }
Whether to put a newline before 'case' statement
nl_before_case True # { False, True }
# Whether to put a newline before 'case' statement
nl_before_throw { Ignore, Add, Remove, Force }
Add or remove newline between ')' and 'throw'
#nl_before_throw { Ignore, Add, Remove, Force }
# Add or remove newline between ')' and 'throw'
nl_after_case { False, True }
Whether to put a newline after 'case' statement
nl_after_case True # { False, True }
# Whether to put a newline after 'case' statement
#nl_namespace_brace { Ignore, Add, Remove, Force }
# Newline between namespace and {
@ -678,16 +678,16 @@ nl_func_paren Remove # { Ignore, Add, Remove, Force }
nl_func_decl_start Remove # { Ignore, Add, Remove, Force }
# Add or remove newline after '(' in a function declaration
nl_func_decl_args Add # { Ignore, Add, Remove, Force }
nl_func_decl_args Force # { Ignore, Add, Remove, Force }
# Add or remove newline after each ',' in a function declaration
nl_func_decl_end Remove # { Ignore, Add, Remove, Force }
# Add or remove newline before the ')' in a function declaration
nl_fdef_brace Add # { Ignore, Add, Remove, Force }
nl_fdef_brace Force # { Ignore, Add, Remove, Force }
# Add or remove newline between function signature and '{'
nl_after_return False; { False, True }
nl_after_return False # { False, True }
# Whether to put a newline after 'return' statement
#nl_after_semicolon { False, True }
@ -701,33 +701,33 @@ nl_after_return False; { False, True }
# If nl_after_brace_open and nl_after_brace_open_cmt are true, a newline is
# placed between the open brace and a trailing single-line comment.
nl_after_vbrace_open { False, True }
Whether to put a newline after a virtual brace open.
These occur in un-braced if/while/do/for statement bodies.
#nl_after_vbrace_open { False, True }
# Whether to put a newline after a virtual brace open.
# These occur in un-braced if/while/do/for statement bodies.
nl_define_macro False # { False, True }
# Whether to alter newlines in '#define' macros
nl_squeeze_ifdef { False, True }
Whether to not put blanks after '#ifxx', '#elxx', or before '#endif'
#nl_squeeze_ifdef { False, True }
# Whether to not put blanks after '#ifxx', '#elxx', or before '#endif'
nl_before_if { Ignore, Add, Remove, Force }
Add or remove newline before 'if'
nl_before_if Ignore # { Ignore, Add, Remove, Force }
# Add or remove newline before 'if'
nl_after_if { Ignore, Add, Remove, Force }
Add or remove newline after 'if'
nl_after_if Ignore # { Ignore, Add, Remove, Force }
# Add or remove newline after 'if'
nl_before_for { Ignore, Add, Remove, Force }
Add or remove newline before 'for'
nl_before_for Ignore # { Ignore, Add, Remove, Force }
# Add or remove newline before 'for'
nl_after_for { Ignore, Add, Remove, Force }
Add or remove newline after 'for'
nl_after_for Ignore # { Ignore, Add, Remove, Force }
# Add or remove newline after 'for'
nl_before_while { Ignore, Add, Remove, Force }
Add or remove newline before 'while'
nl_before_while Ignore # { Ignore, Add, Remove, Force }
# Add or remove newline before 'while'
nl_after_while Add # { Ignore, Add, Remove, Force }
Add or remove newline after 'while'
# Add or remove newline after 'while'
#nl_before_switch Ignore # { Ignore, Add, Remove, Force }
# Add or remove newline before 'switch'
@ -736,16 +736,16 @@ nl_after_while Add # { Ignore, Add, Remove, Force }
# Add or remove newline after 'switch'
nl_before_do Ignore # { Ignore, Add, Remove, Force }
Add or remove newline before 'do'
# Add or remove newline before 'do'
nl_after_do Force # { Ignore, Add, Remove, Force }
Add or remove newline after 'do'
# Add or remove newline after 'do'
nl_ds_struct_enum_cmt False # { False, True }
Whether to double-space commented-entries in struct/enum
# Whether to double-space commented-entries in struct/enum
nl_ds_struct_enum_close_brace False # { False, True }
Whether to double-space before the close brace of a struct/union/enum
# Whether to double-space before the close brace of a struct/union/enum
#nl_class_colon Ignore # { Ignore, Add, Remove, Force }
# Add or remove a newline around a class colon.
@ -768,133 +768,133 @@ nl_create_while_one_liner False # { False, True }
#
pos_bool Lead # { Ignore, Lead, Trail }
The position of boolean operators in wrapped expressions
# The position of boolean operators in wrapped expressions
#pos_comma { Ignore, Lead, Trail }
The position of the comma in wrapped expressions
# The position of the comma in wrapped expressions
#pos_class_comma { Ignore, Lead, Trail }
The position of the comma in the constructor initialization list
# The position of the comma in the constructor initialization list
#
#pos_class_colon { Ignore, Lead, Trail }
The position of colons between constructor and member initialization
# The position of colons between constructor and member initialization
#
# Line Splitting options
#
code_width 76 # Number
Try to limit code width to N number of columns
# Try to limit code width to N number of columns
ls_for_split_full False # { False, True }
Whether to fully split long 'for' statements at semi-colons
# Whether to fully split long 'for' statements at semi-colons
ls_func_split_full False # { False, True }
Whether to fully split long function protos/calls at commas
# Whether to fully split long function protos/calls at commas
#
# Blank line options
#
nl_max 3 # Number
The maximum consecutive newlines
# The maximum consecutive newlines
nl_after_func_proto 2 # Number
The number of newlines after a function prototype, if followed by another function prototype
# The number of newlines after a function prototype, if followed by another function prototype
nl_after_func_proto_group 2 # Number
The number of newlines after a function prototype, if not followed by another function prototype
# The number of newlines after a function prototype, if not followed by another function prototype
nl_after_func_body 2 # Number
The number of newlines after '}' of a multi-line function body
# The number of newlines after '}' of a multi-line function body
nl_after_func_body_one_liner 1 # Number
The number of newlines after '}' of a single line function body
# The number of newlines after '}' of a single line function body
nl_before_block_comment 0 # Number
The minimum number of newlines before a multi-line comment.
Doesn't apply if after a brace open or another multi-line comment.
# The minimum number of newlines before a multi-line comment.
# Doesn't apply if after a brace open or another multi-line comment.
nl_before_c_comment 0 # Number
The minimum number of newlines before a single-line C comment.
Doesn't apply if after a brace open or other single-line C comments.
# The minimum number of newlines before a single-line C comment.
# Doesn't apply if after a brace open or other single-line C comments.
nl_before_cpp_comment 0 # Number
The minimum number of newlines before a CPP comment.
Doesn't apply if after a brace open or other CPP comments.
# The minimum number of newlines before a CPP comment.
# Doesn't apply if after a brace open or other CPP comments.
nl_after_multiline_comment True # { False, True }
Whether to force a newline after a mulit-line comment.
# Whether to force a newline after a multi-line comment.
nl_before_access_spec 1 # Number
The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
Will not change the newline count if after a brace open.
0 = No change.
nl_after_access_spec 1 # Number
The number of newlines after a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
0 = No change.
#nl_before_access_spec 1 # Number
# The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
# Will not change the newline count if after a brace open.
# 0 = No change.
#
#nl_after_access_spec 1 # Number
# The number of newlines after a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
# 0 = No change.
eat_blanks_after_open_brace True # { False, True }
Whether to remove blank lines after '{'
# Whether to remove blank lines after '{'
eat_blanks_before_close_brace True # { False, True }
Whether to remove blank lines before '}'
# Whether to remove blank lines before '}'
#
# Code modifying options (non-whitespace)
#
mod_full_brace_do { Ignore, Add, Remove, Force }
Add or remove braces on single-line 'do' statement
mod_full_brace_do Ignore # { Ignore, Add, Remove, Force }
# Add or remove braces on single-line 'do' statement
mod_full_brace_for { Ignore, Add, Remove, Force }
Add or remove braces on single-line 'for' statement
mod_full_brace_for Ignore # { Ignore, Add, Remove, Force }
# Add or remove braces on single-line 'for' statement
mod_full_brace_function { Ignore, Add, Remove, Force }
Add or remove braces on single-line function defintions. (Pawn)
# mod_full_brace_function { Ignore, Add, Remove, Force }
# Add or remove braces on single-line function defintions. (Pawn)
mod_full_brace_if { Ignore, Add, Remove, Force }
Add or remove braces on single-line 'if' statement
mod_full_brace_if Ignore # { Ignore, Add, Remove, Force }
# Add or remove braces on single-line 'if' statement
#mod_full_brace_nl Number
#mod_full_brace_nl 2
# Don't remove braces around statements that span N newlines
mod_full_brace_while { Ignore, Add, Remove, Force }
Add or remove braces on single-line 'while' statement
mod_full_brace_while Ignore # { Ignore, Add, Remove, Force }
# Add or remove braces on single-line 'while' statement
mod_paren_on_return { Ignore, Add, Remove, Force }
Add or remove unnecessary paren on 'return' statement
mod_paren_on_return Remove # { Ignore, Add, Remove, Force }
# Add or remove unnecessary paren on 'return' statement
mod_pawn_semicolon { False, True }
Whether to change optional semicolons to real semicolons
#mod_pawn_semicolon { False, True }
# Whether to change optional semicolons to real semicolons
mod_full_paren_if_bool { False, True }
Add parens on 'while' and 'if' statement around bools
mod_full_paren_if_bool False # { False, True }
# Add parens on 'while' and 'if' statement around bools
mod_remove_extra_semicolon { False, True }
Whether to remove superfluous semicolons
mod_remove_extra_semicolon True # { False, True }
# Whether to remove superfluous semicolons
mod_add_long_function_closebrace_comment Number
If a function body exceeds the specified number of newlines and doesn't have a comment after
the close brace, a comment will be added.
#mod_add_long_function_closebrace_comment Number
# If a function body exceeds the specified number of newlines and doesn't have a comment after
# the close brace, a comment will be added.
mod_add_long_switch_closebrace_comment Number
If a switch body exceeds the specified number of newlines and doesn't have a comment after
the close brace, a comment will be added.
#mod_add_long_switch_closebrace_comment Number
# If a switch body exceeds the specified number of newlines and doesn't have a comment after
# the close brace, a comment will be added.
mod_sort_import { False, True }
If TRUE, will sort consecutive single-line 'import' statements [Java, D]
#mod_sort_import { False, True }
# If TRUE, will sort consecutive single-line 'import' statements [Java, D]
#
#mod_sort_using { False, True }
# If TRUE, will sort consecutive single-line 'using' statements [C#]
mod_sort_using { False, True }
If TRUE, will sort consecutive single-line 'using' statements [C#]
mod_sort_include False # { False, True }
# If TRUE, will sort consecutive single-line '#include' statements [C/C++] and '#import' statements [Obj-C]
# This is generally a bad idea, as it may break your code.
mod_sort_include { False, True }
If TRUE, will sort consecutive single-line '#include' statements [C/C++] and '#import' statements [Obj-C]
This is generally a bad idea, as it may break your code.
mod_move_case_break { False, True }
If TRUE, it will move a 'break' that appears after a fully braced 'case' before the close brace.
#mod_move_case_break { False, True }
# If TRUE, it will move a 'break' that appears after a fully braced 'case' before the close brace.
#
# Comment modifications
@ -903,31 +903,31 @@ mod_move_case_break { False, True }
cmt_width 76 # Number
# Try to wrap comments at cmt_width columns
cmt_indent_multi False # { False, True }
#cmt_indent_multi False # { False, True }
# Whether to mess with the indent of multi-line comments
cmt_c_group True # { False, True }
#cmt_c_group True # { False, True }
# Whether to group c-comments that look like they are in a block
cmt_c_nl_start False # { False, True }
#cmt_c_nl_start False # { False, True }
# Whether to put an empty '/*' on the first line of the combined c-comment
cmt_c_nl_end False # { False, True }
#cmt_c_nl_end False # { False, True }
# Whether to put a newline before the closing '*/' of the combined c-comment
cmt_cpp_group True # { False, True }
#cmt_cpp_group True # { False, True }
# Whether to group cpp-comments that look like they are in a block
cmt_cpp_nl_start False # { False, True }
#cmt_cpp_nl_start False # { False, True }
# Whether to put an empty '/*' on the first line of the combined cpp-comment
cmt_cpp_nl_end False # { False, True }
#cmt_cpp_nl_end False # { False, True }
# Whether to put a newline before the closing '*/' of the combined cpp-comment
cmt_cpp_to_c True # { False, True }
# Whether to change cpp-comments into c-comments
#cmt_star_cont True # { False, True }
#cmt_star_cont False # { False, True }
# Whether to put a star on subsequent comment lines
#
#cmt_sp_before_star_cont 0 # Number
@ -953,30 +953,30 @@ cmt_cpp_to_c True # { False, True }
# Preprocessor options
#
pp_indent Ignore # { Ignore, Add, Remove, Force }
pp_indent Add # { Ignore, Add, Remove, Force }
# Control indent of preprocessors inside #if blocks at brace level 0
pp_indent_at_level False # { False, True }
#
pp_indent_at_level True # { False, True }
# Whether to indent #if/#else/#endif at the brace level (true) or from column 1 (false)
pp_space Ignore # { Ignore, Add, Remove, Force }
# Add or remove space after # based on pp_level of #if blocks
pp_space_count Number
# Sets the number of spaces added with pp_space
pp_indent_region Number
#
pp_space Remove # { Ignore, Add, Remove, Force }
## Add or remove space after # based on pp_level of #if blocks
#
#pp_space_count 4
## Sets the number of spaces added with pp_space
#
pp_indent_region 4
# The indent for #region and #endregion in C# and '#pragma region' in C/C++
pp_region_indent_code True # { False, True }
#
#pp_region_indent_code True # { False, True }
# Whether to indent the code between #region and #endregion
#pp_indent_if 1 # Number
#
#pp_indent_if 4 # Number
# If pp_indent_at_level=true, sets the indent for #if, #else, and #endif when not at file-level
pp_if_indent_code True # { False, True }
#
#pp_if_indent_code True # { False, True }
# Control whether to indent the code between #if, #else and #endif when not at file-level
pp_define_at_level False # { False, True }
#
#pp_define_at_level False # { False, True }
# Whether to indent '#define' at the brace level (true) or from column 1 (false)