Skip to content

Instantly share code, notes, and snippets.

@chapados
Last active August 29, 2015 14:19
Show Gist options
  • Save chapados/12fed9cb1c9ff08aacef to your computer and use it in GitHub Desktop.
Save chapados/12fed9cb1c9ff08aacef to your computer and use it in GitHub Desktop.
uncrustify_anki
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.4.3 (252)
#
# Alignment
# ---------
## Alignment
# Align function prototypes on operator keyword
align_on_operator = true # boolean (false/true)
# Align on tabstop
align_on_tabstop = false # boolean (false/true)
# Align open brace of single-line functions
align_single_line_brace = true # boolean (false/true)
# Align parameters in single-line functions with same name
align_same_func_call_params = true # boolean (false/true)
# Align single-line functions with function prototypes
align_single_line_func = true # boolean (false/true)
# Align variable definitions
align_func_params = true # boolean (false/true)
# Align with tabs
align_with_tabs = false # boolean (false/true)
# Keep non-indenting tabs
align_keep_tabs = false # boolean (false/true)
# Left-align numbers
align_number_left = true # boolean (false/true)
## Alignment Span
# Alignment span for assignment
align_assign_span = 1 # number
# Alignment span for equals in enums
align_enum_equ_span = 1 # number
# Alignment span for function prototypes
align_func_proto_span = 3 # number
# Alignment span for single-line typedefs
align_typedef_span = 1 # number
# Alignment span for struct initializer values
align_struct_init_span = 1 # number
# Alignment span for struct/union
align_var_struct_span = 1 # number
# Alignment span for trailing comments
align_right_cmt_span = 4 # number
# Alignment span for variable definitions
align_var_def_span = 1 # number
## Alignment Style
# Alignment style for ampersand in typedefs
align_typedef_amp_style = 2 # number
# Alignment style for ampersand in variable definitions
align_var_def_amp_style = 0 # number
# Alignment style for star in typedefs
align_typedef_star_style = 2 # number
# Alignment style for star in variable definitions
align_var_def_star_style = 0 # number
## Gap
# Gap for aligning variable definitions
align_var_def_gap = 1 # number
## Limits
# Align variable definitions threshold
align_var_def_thresh = 3 # number
## Other
# Align attribute after variable name
align_var_def_attribute = true # boolean (false/true)
# Align colon in struct bit fields
align_var_def_colon = true # boolean (false/true)
# Align comments after close brace and endif
align_right_cmt_mix = false # boolean (false/true)
# Align inline struct/enum/union variable definitions
align_var_def_inline = true # boolean (false/true)
# Align left shift operators on new lines
align_left_shift = true # boolean (false/true)
# Align macros wrapped with backslash and newline
align_nl_cont = true # boolean (false/true)
# Align trailing comments beyond column N
align_right_cmt_at_col = 1 # number
# Mix aligining prototype and variable declarations
align_mix_var_proto = false # boolean (false/true)
# Blank Lines
# -----------
## Newline After
# Newline after multiline comment
nl_after_multiline_comment = true # boolean (false/true)
## Newline Count After
# Newline count after access specifier label
nl_after_access_spec = 2 # number
# Newline count after function body
nl_after_func_body = 2 # number
# Newline count after function prototype
nl_after_func_proto = 0 # number
# Newline count after single-line function body
nl_after_func_body_one_liner = 2 # number
# Newline count after try-catch-finally
nl_after_try_catch_finally = 1 # number
# Newline count after variable definition block
nl_func_var_def_blk = 1 # number
## Newline Count Before
# Newline count before C comment
nl_before_c_comment = 2 # number
# Newline count before C++ comment
nl_before_cpp_comment = 2 # number
# Newline count before access specifier label
nl_before_access_spec = 2 # number
# Newline count before multi-line comment
nl_before_block_comment = 2 # number
## Newline Count Between
# Newline count between function def and function comment
nl_comment_func_def = 1 # number
## Other
# Maximum consecutive newlines
nl_max = 3 # number
# Remove blank lines after open brace
eat_blanks_after_open_brace = false # boolean (false/true)
# Remove blank lines before close brace
eat_blanks_before_close_brace = false # boolean (false/true)
# Code-Modifying
# --------------
## Braces
# Braces around statments that span N newlines
mod_full_brace_nl = 1 # number
# Braces on single-line do statement
mod_full_brace_do = remove # string (add/force/ignore/remove)
# Braces on single-line else statement
mod_full_brace_if = add # string (add/force/ignore/remove)
# Braces on single-line for statement
mod_full_brace_for = remove # string (add/force/ignore/remove)
# Braces on single-line while statement
mod_full_brace_while = add # string (add/force/ignore/remove)
## Comments
# Add comment after ifdef/else statement of size
mod_add_long_ifdef_else_comment = 1 # number
# Add comment after ifdef/endif statement of size
mod_add_long_ifdef_endif_comment = 1 # number
## Other
# Move break in fully-braced case before close brace
mod_move_case_break = true # boolean (false/true)
# Remove empty return as last statement in function
mod_remove_empty_return = true # boolean (false/true)
## Parentheses
# Add parentheses on while and if statements around bool
mod_full_paren_if_bool = true # boolean (false/true)
# Remove unnecessary parentheses on return statement
mod_paren_on_return = remove # string (add/force/ignore/remove)
## Semicolons
# Change optional semicolons to real semicolons
mod_pawn_semicolon = false # boolean (false/true)
# Remove superflous semicolons
mod_remove_extra_semicolon = true # boolean (false/true)
## Sorting
# Sort consecutive import statements
mod_sort_import = false # boolean (false/true)
# Sort include statements
mod_sort_include = false # boolean (false/true)
# Sort using statements
mod_sort_using = false # boolean (false/true)
# Comments
# --------
## Empty Lines
# Empty first line for multi-line C comments
cmt_c_nl_start = false # boolean (false/true)
# Empty first line for multi-line C++ comments
cmt_cpp_nl_start = false # boolean (false/true)
# Empty last line for multi-line C comments
cmt_c_nl_end = false # boolean (false/true)
# Empty last line for multi-line C++ comments
cmt_cpp_nl_end = false # boolean (false/true)
## Other
# Change C++ comments to C comments
cmt_cpp_to_c = false # boolean (false/true)
# Comment width
cmt_width = 120 # number
# Group C comments
cmt_c_group = false # boolean (false/true)
# Group C++ comments
cmt_cpp_group = false # boolean (false/true)
# Indent multi-line comments
cmt_indent_multi = true # boolean (false/true)
# Insert function comment if preprocessor statement
cmt_insert_before_preproc = false # boolean (false/true)
# Remove leading spaces from multi-line comments
cmt_multi_check_last = true # boolean (false/true)
# Stars on multi-line comments
cmt_star_cont = false # boolean (false/true)
# General
# -------
## Other
# Newline character
newlines = auto # string (auto/cr/crlf/lf)
# Indentation
# -----------
## Indentation
# Disable indenting function braces
indent_braces_no_func = false # boolean (false/true)
# Double indent size for Indentation options
indent_func_param_double = false # boolean (false/true)
# Indent braces
indent_braces = false # boolean (false/true)
# Indent class body
indent_class = true # boolean (false/true)
# Indent class variable constructors
indent_func_ctor_var_param = false # boolean (false/true)
# Indent continued function call parameters
indent_func_call_param = false # boolean (false/true)
# Indent function call parameters in class declarations
indent_func_class_param = false # boolean (false/true)
# Indent function definition parameters
indent_func_def_param = false # boolean (false/true)
# Indent function prototype parameters
indent_func_proto_param = false # boolean (false/true)
# Indent template parameters
indent_template_param = false # boolean (false/true)
## Indentation Size
# Indent size based on brace parent
indent_brace_parent = false # boolean (false/true)
# Indentation column size
indent_columns = 2 # number
## Other
# Align continued statements at equals
indent_align_assign = true # boolean (false/true)
# Align strings broken by backslash
indent_align_string = true # boolean (false/true)
# Indent BOOL inside parentheses
indent_bool_paren = false # boolean (false/true)
# Indent after class colon
indent_class_colon = true # boolean (false/true)
# Indent code after access specifier
indent_access_spec_body = false # boolean (false/true)
# Indent comma inside parentheses
indent_comma_paren = false # boolean (false/true)
# Indent comments in first column
indent_col1_comment = true # boolean (false/true)
# Indent content after open square followed by newline
indent_square_nl = false # boolean (false/true)
# Indent else\nif
indent_else_if = false # boolean (false/true)
# Indent extern body
indent_extern = false # boolean (false/true)
# Indent namespace body
indent_namespace = false # boolean (false/true)
# Indent newline content after open parenthesis
indent_paren_nl = false # boolean (false/true)
# Indent relative single line comments
indent_relative_single_line_comments = false # boolean (false/true)
# Indent with tabs
indent_with_tabs = 0 # number
# Indentation for constructor initializer list
indent_ctor_init = 0 # number
# Preserve SQL indentation
indent_preserve_sql = false # boolean (false/true)
# Virtual indent from colon for member initializers
indent_ctor_init_leading = 0 # number
# Line-Splitting
# --------------
## Splitting
# Code width
code_width = 120 # number
# Split long for statements at semicolons
ls_for_split_full = false # boolean (false/true)
# Split long function prototypes/calls at commas
ls_func_split_full = true # boolean (false/true)
# Newlines
# --------
## Merging
# Change unbraced for statements into one-liner
nl_create_for_one_liner = true # boolean (false/true)
# Change unbraced if statements into one-liner
nl_create_if_one_liner = true # boolean (false/true)
# Change unbraced while statements into one-liner
nl_create_while_one_liner = true # boolean (false/true)
## Newline After
# Newline after brace close
nl_after_brace_close = false # boolean (false/true)
# Newline after brace open
nl_after_brace_open = false # boolean (false/true)
# Newline after brace open comment
nl_after_brace_open_cmt = false # boolean (false/true)
# Newline after case statement
nl_after_case = false # boolean (false/true)
# Newline after comma in constructor arguments
nl_class_init_args = add # string (add/force/ignore/remove)
# Newline after comma in function declaration
nl_func_decl_args = add # string (add/force/ignore/remove)
# Newline after macro multi-line definition
nl_multi_line_define = false # boolean (false/true)
# Newline after return
nl_after_return = true # boolean (false/true)
# Newline after semicolon
nl_after_semicolon = false # boolean (false/true)
# Newline after virtual brace open
nl_after_vbrace_open = false # boolean (false/true)
## Newline Before
# Newline before case statement
nl_before_case = true # boolean (false/true)
# Newline before do
nl_before_do = add # string (add/force/ignore/remove)
# Newline before for
nl_before_for = add # string (add/force/ignore/remove)
# Newline before if
nl_before_if = add # string (add/force/ignore/remove)
# Newline before switch
nl_before_switch = add # string (add/force/ignore/remove)
# Newline before while
nl_before_while = add # string (add/force/ignore/remove)
## Newline Between
# Newline between class and open brace
nl_class_brace = remove # string (add/force/ignore/remove)
# Newline between close parenthesis and open brace in multi line conditional
nl_multi_line_cond = false # boolean (false/true)
# Newline between else and open brace
nl_else_brace = ignore # string (add/force/ignore/remove)
# Newline between else if and open brace
nl_elseif_brace = ignore # string (add/force/ignore/remove)
# Newline between if and open brace
nl_if_brace = ignore # string (add/force/ignore/remove)
# Newline between namespace and open brace
nl_namespace_brace = remove # string (add/force/ignore/remove)
## Other
# Alter newlines in #define macros
nl_define_macro = true # boolean (false/true)
# Blank lines after preprocessor if/else
nl_squeeze_ifdef = false # boolean (false/true)
# Collapse empty blocks between braces
nl_collapse_empty_body = true # boolean (false/true)
# Double space before close brace of struct/union/enum
nl_ds_struct_enum_close_brace = true # boolean (false/true)
# Double space commented entries in struct/enum
nl_ds_struct_enum_cmt = true # boolean (false/true)
# Newline count at end of file
nl_end_of_file_min = 1 # number
# Newlines at end of file
nl_end_of_file = add # string (add/force/ignore/remove)
## Splitting
# Don’t split one-line braced assignments
nl_assign_leave_one_liners = false # boolean (false/true)
# Don’t split one-line braced statements
nl_class_leave_one_liners = false # boolean (false/true)
# Don’t split one-line enums
nl_enum_leave_one_liners = false # boolean (false/true)
# Don’t split one-line function definitions
nl_func_leave_one_liners = false # boolean (false/true)
# Don’t split one-line get/set functions
nl_getset_leave_one_liners = false # boolean (false/true)
# Don’t split one-line if/else statements
nl_if_leave_one_liners = true # boolean (false/true)
# Preprocessor
# ------------
## Indentation
# Indent preprocessor define
pp_define_at_level = false # boolean (false/true)
# Indent preprocessor if/else/endif
pp_if_indent_code = false # boolean (false/true)
# Indent preprocessor if/else/endif at level
pp_indent_at_level = false # boolean (false/true)
# Indent preprocessor regions
pp_region_indent_code = false # boolean (false/true)
## Space After
# Space after preprocessor hash in if blocks
pp_space = add # string (add/force/ignore/remove)
# Spacing
# -------
## Other
# Balance spaces inside nested parentheses
sp_balance_nested_parens = false # boolean (false/true)
## Space After
# Space after C++ comment opening
sp_cmt_cpp_start = add # string (add/force/ignore/remove)
# Space after ObjC colon
sp_after_oc_colon = remove # string (add/force/ignore/remove)
# Space after ObjC message colon
sp_after_send_oc_colon = add # string (add/force/ignore/remove)
# Space after ObjC scope
sp_after_oc_scope = remove # string (add/force/ignore/remove)
# Space after ObjC type
sp_after_oc_type = remove # string (add/force/ignore/remove)
# Space after address-of operator
sp_addr = remove # string (add/force/ignore/remove)
# Space after angle bracket
sp_after_angle = remove # string (add/force/ignore/remove)
# Space after cast
sp_after_cast = remove # string (add/force/ignore/remove)
# Space after class colon
sp_after_class_colon = add # string (add/force/ignore/remove)
# Space after comma
sp_after_comma = add # string (add/force/ignore/remove)
# Space after dereference operator
sp_deref = remove # string (add/force/ignore/remove)
# Space after double-colon operator
sp_after_dc = remove # string (add/force/ignore/remove)
# Space after final semicolon in empty for statement
sp_after_semi_for_empty = remove # string (add/force/ignore/remove)
# Space after invert operator
sp_inv = remove # string (add/force/ignore/remove)
# Space after not operator
sp_not = remove # string (add/force/ignore/remove)
# Space after operator
sp_after_operator = remove # string (add/force/ignore/remove)
# Space after operator and open parenthesis
sp_after_operator_sym = remove # string (add/force/ignore/remove)
# Space after pointer star
sp_after_ptr_star = ignore # string (add/force/ignore/remove)
# Space after pointer star followed by function
sp_after_ptr_star_func = ignore # string (add/force/ignore/remove)
# Space after preprocessor stringify operator
sp_pp_stringify = add # string (add/force/ignore/remove)
# Space after reference sign
sp_after_byref = add # string (add/force/ignore/remove)
# Space after reference sign followed by function
sp_after_byref_func = add # string (add/force/ignore/remove)
# Space after sign in assignment
sp_sign = remove # string (add/force/ignore/remove)
# Space after type
sp_after_type = add # string (add/force/ignore/remove)
## Space Around
# Space around arithmetic operators
sp_arith = remove # string (add/force/ignore/remove)
# Space around assignment equals in enum
sp_enum_assign = add # string (add/force/ignore/remove)
# Space around assignment operator
sp_assign = add # string (add/force/ignore/remove)
# Space around boolean operators
sp_bool = add # string (add/force/ignore/remove)
# Space around compare operators
sp_compare = add # string (add/force/ignore/remove)
# Space around increment/decrement operators
sp_incdec = remove # string (add/force/ignore/remove)
# Space around member operators
sp_member = remove # string (add/force/ignore/remove)
# Space around preprocessor concatenation operator
sp_pp_concat = add # string (add/force/ignore/remove)
# Space around ternary condition colon
sp_cond_colon = add # string (add/force/ignore/remove)
# Space around ternary condition question mark
sp_cond_question = add # string (add/force/ignore/remove)
## Space Before
# Space before ObjC colon
sp_before_oc_colon = remove # string (add/force/ignore/remove)
# Space before ObjC message colon
sp_before_send_oc_colon = remove # string (add/force/ignore/remove)
# Space before angle brackets
sp_before_angle = remove # string (add/force/ignore/remove)
# Space before backslash-newline at end of line
sp_before_nl_cont = remove # string (add/force/ignore/remove)
# Space before case colon
sp_before_case_colon = remove # string (add/force/ignore/remove)
# Space before class colon
sp_before_class_colon = add # string (add/force/ignore/remove)
# Space before comma
sp_before_comma = remove # string (add/force/ignore/remove)
# Space before double colon
sp_before_dc = remove # string (add/force/ignore/remove)
# Space before empty square brackets
sp_before_squares = remove # string (add/force/ignore/remove)
# Space before if/for/switch/while open parenthesis
sp_before_sparen = add # string (add/force/ignore/remove)
# Space before if/for/while empty statement semicolon
sp_special_semi = remove # string (add/force/ignore/remove)
# Space before open square brackets
sp_before_square = remove # string (add/force/ignore/remove)
# Space before pointer star
sp_before_ptr_star = ignore # string (add/force/ignore/remove)
# Space before pointer star followed by function
sp_before_ptr_star_func = ignore # string (add/force/ignore/remove)
# Space before reference sign
sp_before_byref = remove # string (add/force/ignore/remove)
# Space before reference sign followed by function
sp_before_byref_func = remove # string (add/force/ignore/remove)
# Space before semicolon
sp_before_semi = remove # string (add/force/ignore/remove)
# Space before semicolon in empty for statement
sp_before_semi_for_empty = remove # string (add/force/ignore/remove)
# Space before semicolon in for statements
sp_before_semi_for = remove # string (add/force/ignore/remove)
# Space before unnamed pointer star
sp_before_unnamed_ptr_star = ignore # string (add/force/ignore/remove)
# Space before unnamed reference sign
sp_before_unnamed_byref = remove # string (add/force/ignore/remove)
## Space Between
# Space between __attribute__ and open parenthesis
sp_attribute_paren = remove # string (add/force/ignore/remove)
# Space between angle brackets and open parenthesis
sp_angle_paren = remove # string (add/force/ignore/remove)
# Space between angle brackets and word
sp_angle_word = remove # string (add/force/ignore/remove)
# Space between catch and open brace
sp_catch_brace = add # string (add/force/ignore/remove)
# Space between close brace and else
sp_brace_else = add # string (add/force/ignore/remove)
# Space between close brace and typedef name
sp_brace_typedef = add # string (add/force/ignore/remove)
# Space between close parenthesis and open brace
sp_paren_brace = add # string (add/force/ignore/remove)
# Space between close square and open parenthesis in function call
sp_square_fparen = remove # string (add/force/ignore/remove)
# Space between closing brace and catch
sp_brace_catch = add # string (add/force/ignore/remove)
# Space between closing brace and finally
sp_brace_finally = add # string (add/force/ignore/remove)
# Space between closing parenthesis and open brace
sp_fparen_brace = add # string (add/force/ignore/remove)
# Space between constructor and open parenthesis
sp_func_class_paren = remove # string (add/force/ignore/remove)
# Space between defined and open parenthesis
sp_defined_paren = remove # string (add/force/ignore/remove)
# Space between else and open brace
sp_else_brace = add # string (add/force/ignore/remove)
# Space between finally and open brace
sp_finally_brace = add # string (add/force/ignore/remove)
# Space between function name and open parenthesis
sp_func_call_paren = remove # string (add/force/ignore/remove)
# Space between function name and open parenthesis in declaration
sp_func_proto_paren = remove # string (add/force/ignore/remove)
# Space between function name and open parenthesis in function definition
sp_func_def_paren = remove # string (add/force/ignore/remove)
# Space between get/set and open brace
sp_getset_brace = add # string (add/force/ignore/remove)
# Space between if/for/switch/while close parenthesis and open brace
sp_sparen_brace = add # string (add/force/ignore/remove)
# Space between macro and value
sp_macro = add # string (add/force/ignore/remove)
# Space between macro function close parenthesis and value
sp_macro_func = remove # string (add/force/ignore/remove)
# Space between nested parentheses
sp_paren_paren = remove # string (add/force/ignore/remove)
# Space between pointer stars
sp_between_ptr_star = remove # string (add/force/ignore/remove)
# Space between return and open parenthesis
sp_return_paren = add # string (add/force/ignore/remove)
# Space between return type and function name
sp_type_func = add # string (add/force/ignore/remove)
# Space between sizeof and open parenthesis
sp_sizeof_paren = remove # string (add/force/ignore/remove)
# Space between throw and open parenthesis
sp_throw_paren = remove # string (add/force/ignore/remove)
# Space between try and open brace
sp_try_brace = add # string (add/force/ignore/remove)
# Space between type and open parenthesis in C++ cast
sp_cpp_cast_paren = remove # string (add/force/ignore/remove)
# Space between user function call and open parenthesis
sp_func_call_user_paren = remove # string (add/force/ignore/remove)
## Space Inside
# Space inside angle brackets
sp_inside_angle = remove # string (add/force/ignore/remove)
# Space inside braces
sp_inside_braces = add # string (add/force/ignore/remove)
# Space inside cast parentheses
sp_inside_paren_cast = remove # string (add/force/ignore/remove)
# Space inside empty braces
sp_inside_braces_empty = remove # string (add/force/ignore/remove)
# Space inside empty function parentheses
sp_inside_fparens = remove # string (add/force/ignore/remove)
# Space inside enum braces
sp_inside_braces_enum = add # string (add/force/ignore/remove)
# Space inside function parentheses
sp_inside_fparen = remove # string (add/force/ignore/remove)
# Space inside if-condition parentheses
sp_inside_sparen = add # string (add/force/ignore/remove)
# Space inside non-empty square brackets
sp_inside_square = remove # string (add/force/ignore/remove)
# Space inside parentheses
sp_inside_paren = remove # string (add/force/ignore/remove)
# Space inside struct/union braces
sp_inside_braces_struct = add # string (add/force/ignore/remove)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment