rssguard/resources/scripts/uncrustify/uncrustify.cfg

291 lines
12 KiB
INI

## Qt.
set FOR foreach
set FOR forever
# SIGNAL/SLOT Qt macros have special formatting options. See options_for_QT.cpp for details.
# Default=True
use_options_overriding_for_qt_macros = true # false/true
## General.
newlines = auto # auto/lf/crlf/cr
# The original size of tabs in the input
input_tab_size = 2 # number
# The size of tabs in the output (only used if align_with_tabs=true)
output_tab_size = 2 # number
# Control what to do with the UTF-8 BOM (recommend 'remove')
utf8_bom = remove # ignore/add/remove/force
## Spaces.
# Add or remove space around arithmetic operator '+', '-', '/', '*', etc
# also '>>>' '<<' '>>' '%' '|'
sp_arith = force # ignore/add/remove/force
# Add or remove space around assignment operator '=', '+=', etc
sp_assign = force # ignore/add/remove/force
# Add or remove space after ','
sp_after_comma = force # ignore/add/remove/force
# Add or remove space around '=' in C++11 lambda capture specifications. Overrides sp_assign
sp_cpp_lambda_assign = remove # ignore/add/remove/force
# Add or remove space after the capture specification in C++11 lambda.
sp_cpp_lambda_paren = remove # ignore/add/remove/force
# Add or remove space around assignment operator '=' in a prototype
sp_assign_default = force # ignore/add/remove/force
# Add or remove space around assignment '=' in enum
sp_enum_assign = force # ignore/add/remove/force
# Add or remove space between ')' and '{' of function
sp_fparen_brace = force # ignore/add/remove/force
# Add or remove space before pointer star '*'
sp_before_ptr_star = remove # ignore/add/remove/force
# Add or remove space before pointer star '*' that isn't followed by a variable name
# If set to 'ignore', sp_before_ptr_star is used instead.
sp_before_unnamed_ptr_star = remove # ignore/add/remove/force
# Add or remove space between pointer stars '*'
sp_between_ptr_star = remove # ignore/add/remove/force
# Add or remove space after pointer star '*', if followed by a word.
sp_after_ptr_star = force # ignore/add/remove/force
# Add or remove space after pointer star '*', if followed by a qualifier.
sp_after_ptr_star_qualifier = force # ignore/add/remove/force
# Add or remove space after a pointer star '*', if followed by a func proto/def.
sp_after_ptr_star_func = force # ignore/add/remove/force
# Add or remove space after a pointer star '*', if followed by an open paren (function types).
sp_ptr_star_paren = force # ignore/add/remove/force
# Add or remove space before a pointer star '*', if followed by a func proto/def.
sp_before_ptr_star_func = remove # ignore/add/remove/force
# Add or remove space before a reference sign '&'
sp_before_byref = remove # ignore/add/remove/force
# Add or remove space before a reference sign '&' that isn't followed by a variable name
# If set to 'ignore', sp_before_byref is used instead.
sp_before_unnamed_byref = remove # ignore/add/remove/force
# Add or remove space after reference sign '&', if followed by a word.
sp_after_byref = force # ignore/add/remove/force
# Add or remove space after a reference sign '&', if followed by a func proto/def.
sp_after_byref_func = force # ignore/add/remove/force
# Add or remove space before a reference sign '&', if followed by a func proto/def.
sp_before_byref_func = remove # ignore/add/remove/force
# Add or remove space between '>' and '>' in '>>' (template stuff C++/C# only). Default=Add
sp_angle_shift = remove # ignore/add/remove/force
# Permit removal of the space between '>>' in 'foo<bar<int> >' (C++11 only). Default=False
# sp_angle_shift cannot remove the space without this option.
sp_permit_cpp11_shift = true # false/true
## Indents.
# The number of columns to indent per level.
# Usually 2, 3, 4, or 8. Default=8
indent_columns = 2 # unsigned number
# How to use tabs when indenting code
# 0=spaces only
# 1=indent with tabs to brace level, align with spaces (default)
# 2=indent and align with tabs, using spaces when not on a tabstop
indent_with_tabs = 0 # number
# Whether to indent strings broken by '\' so that they line up
indent_align_string = true # false/true
# Whether the 'namespace' body is indented
indent_namespace = true # false/true
# Whether the 'class' body is indented
indent_class = true # false/true
# Same as indent_label, but for access specifiers that are followed by a colon. Default=1
indent_access_spec = 2 # number
# Indent the code after an access specifier by one level.
# If set, this option forces 'indent_access_spec=0'
indent_access_spec_body = true # false/true
# Spaces to indent 'case' from 'switch'
# Usually 0 or indent_columns.
indent_switch_case = 2 # unsigned number
# indent the continuation of ternary operator.
# 0: (Default) off
# 1: When the `if_false` is a continuation, indent it under `if_false`
# 2: When the `:` is a continuation, indent it under `?`
indent_ternary_operator = 2 # unsigned number
## Newlines.
# Whether to collapse empty blocks between '{' and '}'
nl_collapse_empty_body = true # false/true
# Add or remove newlines at the start of the file
nl_start_of_file = remove # ignore/add/remove/force
# The number of blank lines after a block of variable definitions at the top of a function body
# 0 = No change (default)
nl_func_var_def_blk = 1 # unsigned number
# The number of newlines before a block of typedefs
# 0 = No change (default)
# the option 'nl_after_access_spec' takes preference over 'nl_typedef_blk_start'
nl_typedef_blk_start = 2 # unsigned number
# The number of newlines after a block of typedefs
# 0 = No change (default)
nl_typedef_blk_end = 2 # unsigned number
# The maximum consecutive newlines within a block of typedefs
# 0 = No change (default)
nl_typedef_blk_in = 2 # unsigned number
# The number of newlines after a block of variable definitions not at the top of a function body
# 0 = No change (default)
nl_var_def_blk_end = 2 # unsigned number
# The maximum consecutive newlines within a block of variable definitions
# 0 = No change (default)
nl_var_def_blk_in = 1 # unsigned number
# Add or remove newline between 'enum' and '{'
nl_enum_brace = remove # ignore/add/remove/force
# Add or remove newline between 'enum' and 'class'
nl_enum_class = remove # ignore/add/remove/force
# Add or remove newline between 'enum class' and the identifier
nl_enum_class_identifier = remove # ignore/add/remove/force
# Add or remove newline between 'if' and '{'
nl_if_brace = remove # ignore/add/remove/force
# Add or remove newline between '}' and 'else'
nl_brace_else = force # ignore/add/remove/force
# Add or remove newline between 'else' and '{'
nl_else_brace = remove # ignore/add/remove/force
# Add or remove newline between 'else' and 'if'
nl_else_if = remove # ignore/add/remove/force
# Add or remove newline before 'if'/'else if' closing parenthesis
nl_before_if_closing_paren = remove # ignore/add/remove/force
# Whether to put a newline after 'case' statement
nl_after_case = false # false/true
# Whether to put a newline before 'case' statement, not after the first 'case'
nl_before_case = true # false/true
# Whether to remove blanks after '#ifxx' and '#elxx', or before '#elxx' and '#endif'. Does not affect top-level #ifdefs.
nl_squeeze_ifdef = true # false/true
# Add or remove blank line after 'if' statement.
# Add/Force work only if the next token is not a closing brace
nl_after_if = force # ignore/add/remove/force
# Add or remove blank line after 'for' statement
nl_after_for = force # ignore/add/remove/force
# Add or remove blank line after 'while' statement
nl_after_while = force # ignore/add/remove/force
# Add or remove blank line after 'switch' statement
nl_after_switch = force # ignore/add/remove/force
# Add or remove blank line after 'do/while' statement
nl_after_do = force # ignore/add/remove/force
## Blank line options
# The maximum consecutive newlines (3 = 2 blank lines)
nl_max = 2 # unsigned number
# 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_block_comment = 2 # unsigned 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.
nl_before_c_comment = 2 # unsigned number
# The minimum number of newlines before a CPP comment.
# Doesn't apply if after a brace open or other CPP comments.
nl_before_cpp_comment = 2 # unsigned number
# The number of newlines before a class definition
nl_before_class = 2 # unsigned number
# The number of newlines after '}' or ';' of a class definition
nl_after_class = 2 # unsigned number
# The number of newlines after '}' of a multi-line function body
nl_after_func_body = 2 # unsigned number
# The number of newlines after '}' of a multi-line function body in a class declaration
nl_after_func_body_class = 2 # unsigned number
# The number of newlines after '}' of a single line function body
nl_after_func_body_one_liner = 2 # unsigned 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_before_access_spec = 2 # unsigned number
# The number of newlines after a try-catch-finally block that isn't followed by a brace close.
# 0 = No change.
nl_after_try_catch_finally = 2 # unsigned number
# How aggressively to remove extra newlines not in preproc.
# 0: No change
# 1: Remove most newlines not handled by other config
# 2: Remove all newlines and reformat completely by config
nl_remove_extra_newlines = 0 # unsigned number
## Splitting.
# Try to limit code width to N number of columns
code_width = 140 # unsigned number
# Whether to fully split long function protos/calls at commas
ls_func_split_full = true # false/true
## Comments.
# Set the comment reflow mode (Default=0)
# 0: no reflowing (apart from the line wrapping due to cmt_width)
# 1: no touching at all
# 2: full reflow
cmt_reflow_mode = 2 # number
# Whether to convert all tabs to spaces in comments. Default is to leave tabs inside comments alone, unless used for indenting.
cmt_convert_tab_to_spaces = true # false/true
# Whether to group c-comments that look like they are in a block
cmt_c_group = true # false/true
## Modifications.
# 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 = true # false/true