Debian Codegraph @

.gitlab-ci/uncrustify.cfg

raw symbols SCIP
1 #
2 # Uncrustify config for phosh and related projects
3 #
4
5 # A span is the number of lines considered
6 # A threshold is the maximum number of columns an item is moved
7
8 # Indent by two spaces
9 indent_columns = 2
10 # No tabs
11 indent_with_tabs = 0
12 # Line length
13 code_width = 100
14 # Whether to remove superfluous semicolons
15 mod_remove_extra_semicolon = true
16 # indent goto by 1 (or -1 brace level)
17 indent_label = -1
18 # don't indent case after switch
19 indent_switch_case = 0
20
21 #
22 # Keywords and operators
23 #
24 # Add between 'do' and '{'.
25 sp_do_brace_open = add
26 # Add space between '}' and 'while'.
27 sp_brace_close_while = add
28 # Add 'while' and '('.
29 sp_while_paren_open = add
30 # Add or remove space around boolean operators '&&' and '||'.
31 sp_bool = add
32 # Ternary operator
33 sp_cond_ternary_short = remove
34 # Remove newline between 'struct and '{'.
35 nl_struct_brace = remove
36 # Remove newline between 'if' and '{'.
37 nl_if_brace = remove
38 # Remove newline between '}' and 'else'.
39 nl_brace_else = remove
40 # Remove newline between 'else' and '{'.
41 nl_else_brace = remove
42 # Remove newline between 'else' and 'if'.
43 nl_else_if = remove
44 # Add or remove newline between 'for' and '{'.
45 nl_for_brace = remove
46 # Add or remove newline between 'while' and '{'.
47 nl_while_brace = remove
48 # Treat iterators as for loops:
49 set FOR wl_list_for_each wl_list_for_each_reverse wl_list_for_each_safe
50 # Remove braces on single line if/for/while statements
51 mod_full_brace_if = remove
52 mod_full_brace_for = remove
53 mod_full_brace_while = remove
54 # If any must be braced, they are all braced. If all can be unbraced, then the braces are removed.
55 mod_full_brace_if_chain = 1
56 # Remove braces around case (when there are no variables declarations)
57 mod_case_brace = remove
58 # Don't remove branches if the statement has more than one line
59 mod_full_brace_nl = 2
60
61 #
62 # Function declarations, definitions and calls
63 #
64 # Add space between function name and '(' on function declaration.
65 sp_func_proto_paren = add
66 # Add or remove space between function name and '()' on function declaration
67 # without parameters.
68 sp_func_proto_paren_empty = add
69 # Add space between function name and '(' on function definition.
70 sp_func_def_paren = add
71 # Add or remove space between function name and '(' on function calls.
72 sp_func_call_paren = add
73 # Specialcase i18n macros
74 set func_call_user _ N_ C_
75 sp_func_call_user_paren = remove
76
77 # Whether to force indentation of function definitions to start in column 1.
78 indent_func_def_force_col1 = true
79 # Add newline between return type and function name in a function definition.
80 nl_func_type_name = add
81 # Add newline between function signature and '{'.
82 nl_fdef_brace = add
83 # Whether to align variable definitions in prototypes and functions.
84 align_func_params = true
85 # The span for aligning function prototypes.
86 align_func_proto_span = 8
87 # Add space between 'decltype(...)' and word.
88 sp_after_decltype = add
89 # Add or remove space after a pointer star '*', if followed by a function
90 # prototype or function definition.
91 sp_after_ptr_star_func = remove
92 # Add or remove newline between a function call's ')' and '{', as in
93 # 'list_for_each(item, &list) { }'.
94 nl_fcall_brace = add
95
96 #
97 # Typedefs
98 #
99 # Add space between '}' and the name of a typedef on the same line.
100 sp_brace_typedef = add
101
102 #
103 # Comments
104 #
105 # Add space after the opening of a C++ comment, i.e. '// A' vs. '//A'.
106 sp_cmt_cpp_start = add
107
108 #
109 # Preprocessor
110 #
111 # Add or remove space between #else or #endif and a trailing comment.
112 sp_endif_cmt = add
113 # Offset value that controls the indentation of the body of a multiline #define
114 pp_multiline_define_body_indent = 2
115
116 # Newlines at the start and end of the file.
117 nl_start_of_file = remove
118 nl_end_of_file = add
119 nl_end_of_file_min = 1
120
121 #
122 # Variable definitions
123 #
124 # How to align the '*' in variable definitions.
125 #
126 # 0: Part of the type 'void * foo;' (default)
127 # 1: Part of the variable 'void *foo;'
128 # 2: Dangling 'void *foo;'
129 # Dangling: the '*' will not be taken into account when aligning.
130 align_var_def_star_style = 2
131 # Same for typedefs
132 align_typedef_star_style = 2
133 # The gap for aligning struct/union member definitions.
134 align_var_struct_gap = 1
135 # The span for aligning struct/union member definitions.
136 align_var_struct_span = 4
137 # The threshold for aligning struct/union member definitions.
138 align_var_struct_thresh = 8
139
140 # Remove space between pointer stars '*'.
141 sp_between_ptr_star = remove
142 # Add space before '(' of control statements ('if', 'for', 'switch', 'while', etc.)
143 sp_before_sparen = add
144
145 # Add spaces around assignments and arithmethic operators
146 sp_assign = add
147 sp_arith = add
148