]> git.ipfire.org Git - thirdparty/systemd.git/blame - .clang-format
sd-bus: sd_bus_get_current_* docs fixes
[thirdparty/systemd.git] / .clang-format
CommitLineData
f3a604e4
SJ
1# This configuration file can be used to auto-format the code base.
2# Not all guidelines specified in CODING_STYLE are followed, so the
3# result MUST NOT be committed indiscriminately, but each automated
4# change should be reviewed and only the appropriate ones commited.
5#
6# To apply the coding style you can run the following command (assuming you
7# installed clang-format on your system):
8#
9# $ git ls-files 'src/*.[ch]' 'src/*.cc' | xargs clang-format -i -style=file
10# You can find more information on the different config parameters in this file here:
11# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
12---
13AccessModifierOffset: -4
14AlignAfterOpenBracket: AlwaysBreak
15AlignEscapedNewlines: Left
16AlignOperands: false
17AllowShortFunctionsOnASingleLine: None
18AlwaysBreakBeforeMultilineStrings: true
19AlwaysBreakTemplateDeclarations: Yes
20BinPackArguments: false
21BinPackParameters: false
22BraceWrapping:
23 AfterEnum: true
24 SplitEmptyFunction: false
25 SplitEmptyRecord: false
26 SplitEmptyNamespace: false
27BreakBeforeBraces: Custom
28BreakInheritanceList: BeforeComma
29BreakBeforeTernaryOperators: false
30BreakStringLiterals: false
31ColumnLimit: 109
32CompactNamespaces: true
33ConstructorInitializerAllOnOneLineOrOnePerLine: true
34ConstructorInitializerIndentWidth: 8
35ContinuationIndentWidth: 8
36Cpp11BracedListStyle: false
37ForEachMacros:
38 - BITMAP_FOREACH
39 - CMSG_FOREACH
40 - _DNS_ANSWER_FOREACH
41 - DNS_ANSWER_FOREACH
42 - _DNS_ANSWER_FOREACH_FLAGS
43 - DNS_ANSWER_FOREACH_FLAGS
44 - _DNS_ANSWER_FOREACH_FULL
45 - DNS_ANSWER_FOREACH_FULL
46 - _DNS_ANSWER_FOREACH_IFINDEX
47 - DNS_ANSWER_FOREACH_IFINDEX
48 - _DNS_QUESTION_FOREACH
49 - DNS_QUESTION_FOREACH
50 - FDSET_FOREACH
51 - FOREACH_BTRFS_IOCTL_SEARCH_HEADER
52 - FOREACH_DEVICE
53 - FOREACH_DEVICE_AND_SUBSYSTEM
54 - FOREACH_DEVICE_DEVLINK
55 - FOREACH_DEVICE_PROPERTY
56 - FOREACH_DEVICE_SYSATTR
57 - FOREACH_DEVICE_TAG
58 - FOREACH_DIRENT
59 - FOREACH_DIRENT_ALL
60 - FOREACH_INOTIFY_EVENT
61 - FOREACH_STRING
62 - FOREACH_SUBSYSTEM
63 - _FOREACH_WORD
64 - FOREACH_WORD
65 - FOREACH_WORD_SEPARATOR
66 - HASHMAP_FOREACH
67 - HASHMAP_FOREACH_IDX
68 - HASHMAP_FOREACH_KEY
69 - JOURNAL_FOREACH_DATA_RETVAL
70 - JSON_VARIANT_ARRAY_FOREACH
71 - JSON_VARIANT_OBJECT_FOREACH
72 - LIST_FOREACH
73 - LIST_FOREACH_AFTER
74 - LIST_FOREACH_BEFORE
75 - LIST_FOREACH_OTHERS
76 - LIST_FOREACH_SAFE
77 - MESSAGE_FOREACH_PART
78 - NULSTR_FOREACH
79 - NULSTR_FOREACH_PAIR
80 - OBJECT_PATH_FOREACH_PREFIX
81 - ORDERED_HASHMAP_FOREACH
82 - ORDERED_HASHMAP_FOREACH_KEY
83 - ORDERED_SET_FOREACH
84 - PATH_FOREACH_PREFIX
85 - PATH_FOREACH_PREFIX_MORE
86 - SD_HWDB_FOREACH_PROPERTY
87 - SD_JOURNAL_FOREACH
88 - SD_JOURNAL_FOREACH_BACKWARDS
89 - SD_JOURNAL_FOREACH_DATA
90 - SD_JOURNAL_FOREACH_FIELD
91 - SD_JOURNAL_FOREACH_UNIQUE
92 - SECCOMP_FOREACH_LOCAL_ARCH
93 - SET_FOREACH
94 - SET_FOREACH_MOVE
95 - STRV_FOREACH
96 - STRV_FOREACH_BACKWARDS
97 - STRV_FOREACH_PAIR
98IndentPPDirectives: AfterHash
99IndentWidth: 8
100IndentWrappedFunctionNames: true
101MaxEmptyLinesToKeep: 2
102PenaltyBreakAssignment: 65
103PenaltyBreakBeforeFirstCallParameter: 16
104PenaltyBreakComment: 320
105PenaltyBreakFirstLessLess: 50
106PenaltyBreakString: 0
107PenaltyExcessCharacter: 10
108PenaltyReturnTypeOnItsOwnLine: 100
109SpaceAfterCStyleCast: true
110SpacesInAngles: true
111TabWidth: 8
112UseCRLF: false