-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Expand file tree
/
Copy path.clang-tidy
More file actions
66 lines (59 loc) · 1.92 KB
/
.clang-tidy
File metadata and controls
66 lines (59 loc) · 1.92 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
58
59
60
61
62
63
64
65
66
# QGroundControl C++ Static Analysis
# Clang-Tidy configuration for C++20 and Qt 6
---
Checks: >
-*,
bugprone-*,
-bugprone-easily-swappable-parameters,
-bugprone-exception-escape,
clang-analyzer-*,
-clang-analyzer-cplusplus.NewDeleteLeaks,
modernize-*,
-modernize-use-trailing-return-type,
-modernize-avoid-c-arrays,
performance-*,
readability-*,
-readability-magic-numbers,
-readability-identifier-length,
-readability-function-cognitive-complexity,
cppcoreguidelines-*,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-avoid-const-or-ref-data-members,
WarningsAsErrors: '' # Don't treat warnings as errors by default
CheckOptions:
# Naming conventions (match QGC style)
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.StructCase
value: CamelCase
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.FunctionCase
value: camelBack
- key: readability-identifier-naming.VariableCase
value: camelBack
- key: readability-identifier-naming.PrivateMemberPrefix
value: '_'
- key: readability-identifier-naming.ProtectedMemberPrefix
value: '_'
- key: readability-identifier-naming.ConstexprVariableCase
value: CamelCase
# Modernization options
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: modernize-loop-convert.MinConfidence
value: 'reasonable'
# Performance options
- key: performance-for-range-copy.WarnOnAllAutoCopies
value: 'true'
- key: performance-move-const-arg.CheckTriviallyCopyableMove
value: 'true'
# Readability options
- key: readability-braces-around-statements.ShortStatementLines
value: '0' # Always require braces
HeaderFilterRegex: '.*'
FormatStyle: file
...