-
Notifications
You must be signed in to change notification settings - Fork 76
/
.clang-tidy
96 lines (81 loc) · 2.99 KB
/
.clang-tidy
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Checks: [
bugprone*,
cert*,
cppcoreguidelines*,
# Need globals to communicate with interrupts
-cppcoreguidelines-avoid-non-const-global-variables,
# Covered by readability-magic-numbers
-cppcoreguidelines-avoid-magic-numbers,
# We use global aggregates to dispatch extern registers.
# This cannot cause order-of-initialization problems because
# registers are guaranteed to be initialized at reset.
-cppcoreguidelines-interfaces-global-init,
google*,
hicpp*,
# Bad warning: https://stackoverflow.com/questions/50399090/use-of-a-signed-integer-operand-with-a-binary-bitwise-operator-when-using-un
-hicpp-signed-bitwise,
llvm*,
# We use a different include guard style
-llvm-header-guard,
misc*,
modernize*,
performance*,
readability*,
]
CheckOptions:
- key: bugprone-easily-swappable-parameters.ModelImplicitConversions
value: false
- key: readability-function-cognitive-complexity.Threshold
value: '10'
- key: readability-function-size.LineThreshold
value: '80'
- key: readability-identifier-length.MinimumParameterNameLength
value: '1'
- key: readability-identifier-length.IgnoredVariableNames
value: '^dt|pu$'
- key: readability-magic-numbers.IgnorePowersOf2IntegerValues
value: 'true'
- key: readability-magic-numbers.IgnoredIntegerValues
value: '15;255;4095;65535;'
# Empty loops should look like this: while (condition) continue;
- key: readability-braces-around-statements.ShortStatementLines
value: '1'
- key: hicpp-braces-around-statements.ShortStatementLines
value: '1'
- key: readability-identifier-naming.EnumCase
value: 'CamelCase'
- key: readability-identifier-naming.FunctionCase
value: 'lower_case'
# Public functions have capitalized prefix
- key: readability-identifier-naming.GlobalFunctionCase
value: 'aNy_CasE'
# Interrupt service routines
- key: readability-identifier-naming.GlobalFunctionIgnoredRegexp
value: '_[A-Z0-9]+Interrupt'
- key: readability-identifier-naming.VariableCase
value: 'lower_case'
# Register names
- key: readability-identifier-naming.VariableIgnoredRegexp
value: '[A-Z][A-Z0-9]+(bits)?'
- key: readability-identifier-naming.StructCase
value: 'CamelCase'
- key: readability-identifier-naming.TypedefCase
value: 'CamelCase'
- key: readability-identifier-naming.TypedefIgnoredRegexp
value: '[A-Z]+_[a-zA-Z0-9]+'
- key: readability-identifier-naming.EnumIgnoredRegexp
value: '[A-Z]+_[a-zA-Z0-9]+'
- key: readability-identifier-naming.StructIgnoredRegexp
value: '[A-Z]+_[a-zA-Z0-9]+'
- key: readability-identifier-naming.UnionIgnoredRegexp
value: '[A-Z]+_[a-zA-Z0-9]+'
- key: readability-identifier-naming.UnionCase
value: 'CamelCase'
- key: readability-identifier-naming.GlobalConstantCase
value: 'UPPER_CASE'
- key: readability-identifier-naming.GlobalConstantPrefix
value: 'g_'
- key: readability-identifier-naming.MacroDefinitionCase
value: 'UPPER_CASE'
FormatStyle: file
SystemHeaders: false