Debian Codegraph @

.cmake-format

raw
1
2 # --------------------------
3 # General Formatting Options
4 # --------------------------
5 # How wide to allow formatted cmake files
6 line_width = 80
7
8 # How many spaces to tab for indent
9 tab_size = 2
10
11 # If an argument group contains more than this many sub-groups (parg or kwarg
12 # groups), then force it to a vertical layout.
13 max_subgroups_hwrap = 2
14
15 # If a positional argument group contains more than this many arguments, then
16 # force it to a vertical layout.
17 max_pargs_hwrap = 6
18
19 # If true, separate flow control names from their parentheses with a space
20 separate_ctrl_name_with_space = False
21
22 # If true, separate function names from parentheses with a space
23 separate_fn_name_with_space = False
24
25 # If a statement is wrapped to more than one line, than dangle the closing
26 # parenthesis on it's own line.
27 dangle_parens = False
28
29 # If the trailing parenthesis must be 'dangled' on it's on line, then align it
30 # to this reference: `prefix`: the start of the statement, `prefix-indent`: the
31 # start of the statement, plus one indentation level, `child`: align to the
32 # column of the arguments
33 dangle_align = 'prefix'
34
35 min_prefix_chars = 4
36
37 # If the statement spelling length (including space and parenthesis) is larger
38 # than the tab width by more than this amount, then force reject un-nested
39 # layouts.
40 max_prefix_chars = 10
41
42 # If a candidate layout is wrapped horizontally but it exceeds this many lines,
43 # then reject the layout.
44 max_lines_hwrap = 2
45
46 # What style line endings to use in the output.
47 line_ending = 'unix'
48
49 # Format command names consistently as 'lower' or 'upper' case
50 command_case = 'canonical'
51
52 # Format keywords consistently as 'lower' or 'upper' case
53 keyword_case = 'unchanged'
54
55 # Specify structure for custom cmake functions
56 additional_commands = {
57 "foo": {
58 "flags": [
59 "BAR",
60 "BAZ"
61 ],
62 "kwargs": {
63 "HEADERS": "*",
64 "SOURCES": "*",
65 "DEPENDS": "*"
66 }
67 }
68 }
69
70 # A list of command names which should always be wrapped
71 always_wrap = []
72
73 # If true, the argument lists which are known to be sortable will be sorted
74 # lexicographicall
75 enable_sort = True
76
77 # If true, the parsers may infer whether or not an argument list is sortable
78 # (without annotation).
79 autosort = False
80
81 # If a comment line starts with at least this many consecutive hash characters,
82 # then don't lstrip() them off. This allows for lazy hash rulers where the first
83 # hash char is not separated by space
84 hashruler_min_length = 10
85
86 # By default, if cmake-format cannot successfully fit everything into the
87 # desired linewidth it will apply the last, most agressive attempt that it made.
88 # If this flag is True, however, cmake-format will print error, exit with non-
89 # zero status code, and write-out nothing
90 require_valid_layout = False
91
92 # A dictionary containing any per-command configuration overrides. Currently
93 # only `command_case` is supported.
94 per_command = {}
95
96 # A dictionary mapping layout nodes to a list of wrap decisions. See the
97 # documentation for more information.
98 layout_passes = {}
99
100
101 # --------------------------
102 # Comment Formatting Options
103 # --------------------------
104 # What character to use for bulleted lists
105 bullet_char = '*'
106
107 # What character to use as punctuation after numerals in an enumerated list
108 enum_char = '.'
109
110 # enable comment markup parsing and reflow
111 enable_markup = True
112
113 # If comment markup is enabled, don't reflow the first comment block in each
114 # listfile. Use this to preserve formatting of your copyright/license
115 # statements.
116 first_comment_is_literal = False
117
118 # If comment markup is enabled, don't reflow any comment block which matches
119 # this (regex) pattern. Default is `None` (disabled).
120 literal_comment_pattern = None
121
122 # Regular expression to match preformat fences in comments
123 # default=r'^\s*([`~]{3}[`~]*)(.*)$'
124 fence_pattern = '^\\s*([`~]{3}[`~]*)(.*)$'
125
126 # Regular expression to match rulers in comments
127 # default=r'^\s*[^\w\s]{3}.*[^\w\s]{3}$'
128 ruler_pattern = '^\\s*[^\\w\\s]{3}.*[^\\w\\s]{3}$'
129
130 # If true, then insert a space between the first hash char and remaining hash
131 # chars in a hash ruler, and normalize it's length to fill the column
132 canonicalize_hashrulers = True
133
134
135 # ---------------------------------
136 # Miscellaneous Options
137 # ---------------------------------
138 # If true, emit the unicode byte-order mark (BOM) at the start of the file
139 emit_byteorder_mark = False
140
141 # Specify the encoding of the input file. Defaults to utf-8.
142 input_encoding = 'utf-8'
143
144 # Specify the encoding of the output file. Defaults to utf-8. Note that cmake
145 # only claims to support utf-8 so be careful when using anything else
146 output_encoding = 'utf-8'
147