-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy path.clang-tidy
More file actions
57 lines (52 loc) · 2.14 KB
/
.clang-tidy
File metadata and controls
57 lines (52 loc) · 2.14 KB
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
Checks:
'-*,
modernize-*,
-modernize-macro-to-enum,
cert-*,
bugprone-*,
-bugprone-easily-swappable-parameters,
-bugprone-assignment-in-if-condition,
clang-analyzer-*,
-clang-analyzer-deadcode.DeadStores,
misc-*,
-misc-no-recursion,
-misc-unused-parameters,
-misc-include-cleaner,
readability-non-const-parameter,
readability-inconsistent-declaration-parameter-name,
readability-redundant-control-flow,
readability-duplicate-include,
readability-avoid-const-params-in-decls,
readability-function-cognitive-complexity'
# Setting cognitive complexity to 100.
# This is quite high, but should be seen as a starting point
# to resolve other complex functions over time to get back to the default
# value of 25
CheckOptions:
- key: readability-function-cognitive-complexity.Threshold
value: 100
# Other available checks:
# clang-analyzer-*, performance-*, readability-*, misc-*
# Disabled checks:
# - bugprone-easily-swappable-parameters:
# Warns a LOT. Sometimes on functions meant to look like standardized C11 annex k functions.
# While overall useful, it's too noisy right now and may complicate API usability.
# - clang-analyzer-deadcode.DeadStores:
# Generates many warnings. Cleanup is needed, but focus on more pressing issues first.
# - misc-no-recursion:
# Recursion is useful in our code, so this check is not applicable.
# - misc-unused-parameters:
# Too many false positives.
# - misc-include-cleaner
# We have a lot of includes wrapping others to work around system differences. This creates too much noise
# when it is enabled.
# - modernize-macro-to-enum
# This is a great modernization, however it does not make sense everywhere.
# There are plenty of places to use this, however since we do not want to migrate to C11 as a requirement
# yet, this is not something we want to enable due to noise since anonymous enums are a C11 standard and not earlier.
# if/when we require C11, we should enable this
# - readability-*:
# Currently generates too many warnings. Manually adding rules until we can address these issues later.
WarningsAsErrors: ''
HeaderFilterRegex: '.*'
FormatStyle: 'file'