Skip to content

Commit 49ba049

Browse files
committed
add clang-tidy config
1 parent f05a52e commit 49ba049

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.clang-tidy

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Checks: >-
2+
bugprone-*,
3+
cppcoreguidelines-*,
4+
google-*,
5+
misc-*,
6+
modernize-*,
7+
performance-*,
8+
readability-*,
9+
-bugprone-lambda-function-name,
10+
-bugprone-reserved-identifier,
11+
-cppcoreguidelines-avoid-goto,
12+
-cppcoreguidelines-avoid-magic-numbers,
13+
-cppcoreguidelines-avoid-non-const-global-variables,
14+
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
15+
-cppcoreguidelines-pro-type-vararg,
16+
-google-readability-braces-around-statements,
17+
-google-readability-function-size,
18+
-misc-no-recursion,
19+
-modernize-return-braced-init-list,
20+
-modernize-use-nodiscard,
21+
-modernize-use-trailing-return-type,
22+
-performance-unnecessary-value-param,
23+
-readability-magic-numbers,
24+
25+
CheckOptions:
26+
- key: readability-function-cognitive-complexity.Threshold
27+
value: 100
28+
- key: readability-function-cognitive-complexity.IgnoreMacros
29+
value: true
30+
# Set naming conventions for your style below (there are dozens of naming settings possible):
31+
# See https://clang.llvm.org/extra/clang-tidy/checks/readability/identifier-naming.html
32+
# - key: readability-identifier-naming.ClassCase
33+
# value: CamelCase
34+
# - key: readability-identifier-naming.NamespaceCase
35+
# value: lower_case
36+
# - key: readability-identifier-naming.PrivateMemberSuffix
37+
# value: _
38+
# - key: readability-identifier-naming.StructCase
39+
# value: CamelCase
40+
41+
WarningsAsErrors: '*'
42+
HeaderFilterRegex: 'include/mgutility/.*'

.trunk/trunk.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ runtimes:
1818
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
1919
lint:
2020
enabled:
21+
- clang-tidy@16.0.3
2122
- clang-format@16.0.3
2223
- actionlint@1.7.1
2324
- checkov@3.2.144

0 commit comments

Comments
 (0)