Skip to content

Commit 0874cc4

Browse files
committed
Add new .clang-tidy
For PRs/diffs checks mainly as our code still fails several checks.
1 parent 605b04e commit 0874cc4

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.clang-tidy

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#
2+
# Disabled or configured checks:
3+
#
4+
# bugprone-easily-swappable-parameters: We have a lot of functions
5+
# with (int, int) or (string, string) so it does't make sense to enable
6+
# this option.
7+
#
8+
# readability-braces-around-statements: We use a lot of:
9+
# if (cond)
10+
# stmt;
11+
# else
12+
# stmt;
13+
# and there is no way to allow this with this check.
14+
#
15+
# readability-function-cognitive-complexity: We have this disabled
16+
# temporarily, but it'd be nice to enable this with a high threshold
17+
# in the future.
18+
#
19+
# readability-identifier-length: We use a lot of short names like x,
20+
# y, w, h so we prefer to remove this.
21+
#
22+
# readability-magic-numbers: We use a lot of magic numbers like 8, 16,
23+
# 24 for masks like 0xFF00, etc.
24+
#
25+
# readability-isolate-declaration: We use multiple declarations
26+
# several times (e.g. int x, y, etc.)
27+
#
28+
# readability-uppercase-literal-suffix: We use a lot of 0.0f, but in a
29+
# future we might enable this.
30+
#
31+
# misc-non-private-member-variables-in-classes: We use structs with
32+
# all public members in some cases.
33+
#
34+
---
35+
Checks: >
36+
-*,
37+
bugprone-*,
38+
clang-analyzer-*,
39+
concurrency-*,
40+
misc-*,
41+
performance-*,
42+
portability-*,
43+
readability-*,
44+
-bugprone-easily-swappable-parameters,
45+
-readability-braces-around-statements,
46+
-readability-function-cognitive-complexity,
47+
-readability-identifier-length,
48+
-readability-isolate-declaration,
49+
-readability-magic-numbers,
50+
-readability-uppercase-literal-suffix
51+
WarningsAsErrors: ''
52+
CheckOptions:
53+
- key: readability-implicit-bool-conversion.AllowPointerConditions
54+
value: true
55+
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
56+
value: true
57+
...

0 commit comments

Comments
 (0)