-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
48 lines (47 loc) · 1.31 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
# SPDX-License-Identifier: Apache-2.0
#
# .clang-format inspired by the Zephyr RTOS project
#
# References:
# - https://clang.llvm.org/docs/ClangFormatStyleOptions.html
---
BasedOnStyle: LLVM
AlignConsecutiveMacros: true
AlignConsecutiveAssignments: true
# AlignConsecutiveDeclarations: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: false
AlignTrailingComments: true
BinPackArguments: false
BinPackParameters: false
AttributeMacros:
- __aligned
- __deprecated
- __packed
- __printf_like
- __syscall
- __subsystem
BreakBeforeBraces: Linux
ColumnLimit: 90
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^".*\.h"$'
Priority: 0
- Regex: '^<(assert|complex|ctype|errno|fenv|float|inttypes|limits|locale|math|setjmp|signal|stdarg|stdbool|stddef|stdint|stdio|stdlib|string|tgmath|time|wchar|wctype)\.h>$'
Priority: 1
- Regex: '^\<avrtos/.*\.h\>$'
Priority: 2
- Regex: '.*'
Priority: 3
IndentCaseLabels: false
IndentWidth: 4
# SpaceBeforeParens: ControlStatementsExceptControlMacros # clang-format >= 13.0
WhitespaceSensitiveMacros:
- STRINGIFY
- Z_STRINGIFY