imgbrd-grabber/uncrustify.cfg

105 lines
3.1 KiB
INI
Raw Normal View History

2018-08-22 22:06:30 +08:00
# Use tabs
indent_with_tabs = 2
input_tab_size = 4
output_tab_size = 4
indent_columns = output_tab_size
align_with_tabs = true
align_on_tabstop = true
# Indent inside classes
indent_class = 1
indent_access_spec = 1
indent_access_spec_body = true
2019-01-14 10:18:56 +08:00
# Force a line break at the end of files
nl_end_of_file = force
nl_end_of_file_min = 1
2018-08-22 22:06:30 +08:00
# Stick pointer and reference symbol to variable
align_var_def_star_style = 1
align_var_def_amp_style = 1
# Allow empty function body to be written as '{}'
nl_collapse_empty_body = true
# Indent instead of aligning
indent_align_assign = false
indent_single_after_return = true
indent_func_call_param = true
indent_member_single = true
indent_paren_close = 2
indent_shift = true
2020-06-04 06:03:49 +08:00
indent_cpp_lambda_only_once = true
2018-08-22 22:06:30 +08:00
# Keep one line control structures
nl_func_leave_one_liners = true
nl_cpp_lambda_leave_one_liners = true
2019-01-13 23:42:54 +08:00
nl_if_leave_one_liners = false
nl_while_leave_one_liners = false
nl_for_leave_one_liners = false
2018-08-24 17:44:48 +08:00
# Preprocessor
pp_indent_at_level = true
pp_if_indent_code = true
2018-08-22 22:06:30 +08:00
# Others
indent_ternary_operator = 0
indent_namespace = true
mod_paren_on_return = ignore
indent_switch_case = 4
cmt_indent_multi = false
2018-08-24 17:44:48 +08:00
use_options_overriding_for_qt_macros = false
2018-08-22 22:06:30 +08:00
2019-01-13 23:42:54 +08:00
# Force braces
mod_full_brace_do = force
mod_full_brace_for = force
mod_full_brace_function = force
mod_full_brace_if = force
mod_full_brace_while = force
mod_full_brace_using = force
2018-08-22 22:06:30 +08:00
# Line breaks
nl_enum_brace = force # "enum {" vs "enum \n {"
nl_union_brace = force # "union {" vs "union \n {"
nl_struct_brace = force # "struct {" vs "struct \n {"
2019-01-13 23:42:54 +08:00
nl_do_brace = remove # "do {" vs "do \n {"
nl_if_brace = remove # "if () {" vs "if () \n {"
nl_for_brace = remove # "for () {" vs "for () \n {"
nl_else_brace = remove # "else {" vs "else \n {"
nl_while_brace = remove # "while () {" vs "while () \n {"
2018-08-22 22:06:30 +08:00
nl_switch_brace = force # "switch () {" vs "switch () \n {"
nl_brace_while = remove # "} while" vs "} \n while" - cuddle while
2019-01-13 23:42:54 +08:00
nl_brace_else = remove # "} else" vs "} \n else" - cuddle else
2021-01-28 23:41:02 +08:00
nl_fcall_brace = force # "list_for_each() {" vs "list_for_each()\n{"
2018-08-22 22:06:30 +08:00
nl_fdef_brace = force # "int foo() {" vs "int foo()\n{"
# Spaces
sp_sizeof_paren = remove # "sizeof (int)" vs "sizeof(int)"
sp_before_sparen = force # "if (" vs "if("
sp_after_sparen = force # "if () {" vs "if (){"
2020-06-04 06:03:49 +08:00
sp_after_cast = force # "(int) a" vs "(int)a"
2018-08-24 17:44:48 +08:00
sp_cmt_cpp_start = force # '// A' vs '//A'.
2019-01-13 23:42:54 +08:00
sp_inside_braces = ignore # "{ 1 }" vs "{1}"
2018-08-22 22:06:30 +08:00
sp_inside_braces_struct = force # "{ 1 }" vs "{1}"
sp_inside_braces_enum = force # "{ 1 }" vs "{1}"
2019-01-13 23:42:54 +08:00
sp_inside_braces_empty = remove # "{ }" vs "{}"
sp_else_brace = force # "else {" vs "else{"
sp_brace_else = force # "} else" vs "}else"
2018-08-22 22:06:30 +08:00
sp_assign = force
sp_arith = force
sp_bool = force
sp_compare = force
sp_angle_paren = remove
sp_angle_paren_empty = remove
sp_angle_shift = remove
sp_permit_cpp11_shift = true
sp_template_angle = force
sp_before_angle = remove
sp_inside_angle = remove
sp_assign = force
sp_after_comma = force
sp_func_def_paren = remove # "int foo (){" vs "int foo(){"
sp_func_call_paren = remove # "foo (" vs "foo("
sp_func_proto_paren = remove # "int foo ();" vs "int foo();"
2021-01-28 23:41:02 +08:00
sp_cpp_lambda_assign = remove # "[ = ]() {}" vs "[=]() {}"