-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.clang-tidy
More file actions
195 lines (133 loc) · 5.17 KB
/
.clang-tidy
File metadata and controls
195 lines (133 loc) · 5.17 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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# ============================================================
# mcpp-community clang-tidy configuration
#
# Defines the static analysis rules used by mcpp-community
# projects to enforce correctness, performance, and portability.
#
# Repository:
# https://github.com/mcpp-community/mcpp-style-ref
#
# Strategy:
# - Whitelist-based rule selection
# - Enable high-value static analysis checks
# - Avoid overly opinionated style rules
#
# Target:
# Modern C++ projects (C++23 and above)
# Generic libraries (STL-like containers, algorithms, utilities)
# ============================================================
Checks:
# ------------------------------------------------------------
# Disable all checks (whitelist mode)
# ------------------------------------------------------------
-*
# ------------------------------------------------------------
# Compiler diagnostics
# Forward compiler warnings into clang-tidy
# ------------------------------------------------------------
clang-diagnostic-*
# ------------------------------------------------------------
# Clang static analyzer
# Advanced static analysis (memory, null, logic)
# ------------------------------------------------------------
clang-analyzer-*
# ------------------------------------------------------------
# Bug-prone patterns
# Detect common programming mistakes
# ------------------------------------------------------------
bugprone-*
# ------------------------------------------------------------
# Performance improvements
# Detect inefficient code patterns
# ------------------------------------------------------------
performance-*
# ------------------------------------------------------------
# Modern C++ improvements
# Suggest modern C++ constructs
# ------------------------------------------------------------
modernize-*
# ------------------------------------------------------------
# Miscellaneous useful checks
# Various useful static checks
# ------------------------------------------------------------
misc-*
# ------------------------------------------------------------
# Portability checks
# Detect cross-platform issues
# ------------------------------------------------------------
portability-*
# ------------------------------------------------------------
# Selected readability checks
# ------------------------------------------------------------
# Require braces for control statements
readability-braces-around-statements
# Avoid implicit bool conversions
readability-implicit-bool-conversion
# Simplify boolean expressions
readability-simplify-boolean-expr
# Encourage qualified auto usage
readability-qualified-auto
# ------------------------------------------------------------
# Disabled modernize checks
# ------------------------------------------------------------
# Do not force auto usage
-modernize-use-auto
# Allow C-style arrays where appropriate
-modernize-avoid-c-arrays
# ------------------------------------------------------------
# Disabled readability checks
# ------------------------------------------------------------
# Naming handled by project conventions
-readability-identifier-naming
# Algorithms frequently use literal constants
-readability-magic-numbers
# Not suitable for template-heavy code
-readability-function-size
# ------------------------------------------------------------
# Disabled ecosystem-specific checks
# ------------------------------------------------------------
# Fuchsia project specific
-fuchsia-*
# Zircon kernel specific
-zircon-*
# Abseil library specific
-abseil-*
# Android codebase specific
-android-*
# LLVM coding style specific
-llvm-*
# ------------------------------------------------------------
# General configuration
# ------------------------------------------------------------
WarningsAsErrors: ''
HeaderFilterRegex: '.*'
AnalyzeTemporaryDtors: false
FormatStyle: none
# ------------------------------------------------------------
# Check options
# ------------------------------------------------------------
CheckOptions:
# ------------------------------------------------------------
# readability configuration
# ------------------------------------------------------------
# Always require braces
- key: readability-braces-around-statements.ShortStatementLines
value: '0'
# ------------------------------------------------------------
# modernize configuration
# ------------------------------------------------------------
# Avoid aggressive loop rewriting
- key: modernize-loop-convert.MinConfidence
value: reasonable
# ------------------------------------------------------------
# performance configuration
# ------------------------------------------------------------
# No additional allowed types
- key: performance-unnecessary-value-param.AllowedTypes
value: ''
# ------------------------------------------------------------
# misc configuration
# ------------------------------------------------------------
# Ignore unused parameters in virtual overrides
- key: misc-unused-parameters.IgnoreVirtual
value: 'true'