-
Notifications
You must be signed in to change notification settings - Fork 3
/
.clang-format
50 lines (48 loc) · 1.68 KB
/
.clang-format
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Configuration for clang-format automated reformatting. -*- yaml -*-
#
# This configuration requires Clang 13.0 or later.
#
# The canonical version of this file is maintained in the rra-c-util package,
# which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
#
# Copyright 2020-2021 Russ Allbery <[email protected]>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#
# SPDX-License-Identifier: FSFAP
---
Language: Cpp
BasedOnStyle: LLVM
AlignArrayOfStructures: Left
AlignConsecutiveMacros: AcrossEmptyLinesAndComments
AlignEscapedNewlines: Left
AllowShortEnumsOnASingleLine: false
AlwaysBreakAfterReturnType: AllDefinitions
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: WebKit
ColumnLimit: 79
IndentPPDirectives: AfterHash
IndentWidth: 4
IndentWrappedFunctionNames: false
MaxEmptyLinesToKeep: 2
SpaceAfterCStyleCast: true
---
# Additional formatting options that we would like to use but cannot (at least
# yet):
#
# PPIndentWidth: 1
# Better indentation of #if blocks, but unfortunately in Clang 13.0 this
# indentation is also applied to code in #define macros, so produces:
#
# #define ENTRY(args, flags) \
# do { \
# if (args->debug) \
# putil_log_entry((args), __func__, (flags)); \
# } while (0)
#
# Should be used as soon as there is a way to distinguish between
# identation of the preprocessor directives themselves and the code blocks
# in #define.