1 # Configuration for clang-format automated reformatting. -*- yaml -*-
3 # This configuration requires Clang 13.0 or later.
5 # The canonical version of this file is maintained in the rra-c-util package,
6 # which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
8 # Copyright 2020-2021 Russ Allbery <eagle@eyrie.org>
10 # Copying and distribution of this file, with or without modification, are
11 # permitted in any medium without royalty provided the copyright notice
12 # and this notice are preserved. This file is offered as-is, without any
15 # SPDX-License-Identifier: FSFAP
20 AlignArrayOfStructures: Left
21 AlignConsecutiveMacros: AcrossEmptyLinesAndComments
22 AlignEscapedNewlines: Left
23 AllowShortEnumsOnASingleLine: false
24 AlwaysBreakAfterReturnType: AllDefinitions
25 BreakBeforeBinaryOperators: NonAssignment
26 BreakBeforeBraces: WebKit
28 IndentPPDirectives: AfterHash
30 IndentWrappedFunctionNames: false
31 MaxEmptyLinesToKeep: 2
32 SpaceAfterCStyleCast: true
35 # Additional formatting options that we would like to use but cannot (at least
39 # Better indentation of #if blocks, but unfortunately in Clang 13.0 this
40 # indentation is also applied to code in #define macros, so produces:
42 # #define ENTRY(args, flags) \
45 # putil_log_entry((args), __func__, (flags)); \
48 # Should be used as soon as there is a way to distinguish between
49 # identation of the preprocessor directives themselves and the code blocks