Skip to content

Commit b8a9ecd

Browse files
committed
Use a clang-tidy configuration file
1 parent 8a739e4 commit b8a9ecd

File tree

2 files changed

+39
-13
lines changed

2 files changed

+39
-13
lines changed

.clang-tidy

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Checks: >
2+
clang-analyzer-*,
3+
bugprone-*,
4+
performance-*,
5+
readability-*,
6+
modernize-*,
7+
cppcoreguidelines-*,
8+
misc-*,
9+
-modernize-use-trailing-return-type,
10+
-modernize-use-auto,
11+
-modernize-use-using,
12+
-modernize-use-nodiscard,
13+
-cppcoreguidelines-macro-usage,
14+
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
15+
-cppcoreguidelines-pro-type-union-access,
16+
-readability-function-cognitive-complexity,
17+
-llvmlibc-restrict-system-libc-headers,
18+
-llvmlibc-implementation-in-namespace,
19+
-altera-unroll-loops,
20+
-misc-definitions-in-headers
21+
22+
WarningsAsErrors: ''
23+
HeaderFilterRegex: '.*(Common|SparseBindingTest|Tests|VmaUsage|VulkanSample)\.(cpp|h)$|.*vk_mem_alloc\.h$'
24+
FormatStyle: file
25+
AnalyzeTemporaryDtors: true
26+
CheckOptions:
27+
- key: modernize-loop-convert.MaxCopySize
28+
value: '16'
29+
- key: readability-identifier-naming.VariableCase
30+
value: camelBack
31+
- key: readability-identifier-naming.ClassCase
32+
value: CamelCase
33+
- key: readability-identifier-naming.FunctionCase
34+
value: camelBack
35+
- key: cppcoreguidelines-avoid-magic-numbers.IgnoreEnums
36+
value: '1'
37+
- key: cppcoreguidelines-avoid-magic-numbers.IgnoreOctalLiterals
38+
value: '1'

.github/workflows/static_code_analysis.yaml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,4 @@ jobs:
4242
4343
- name: Run Clang-Tidy
4444
run: |
45-
find . -name '*.cpp' | xargs clang-tidy-15 -checks='*, \
46-
-modernize-use-trailing-return-type, \
47-
-cppcoreguidelines-macro-usage, \
48-
-modernize-use-auto, \
49-
-modernize-use-using \
50-
-modernize-use-nodiscard \
51-
-altera-unroll-loops \
52-
-misc-definitions-in-headers \
53-
-cppcoreguidelines-pro-bounds-pointer-arithmetic \
54-
-readability-function-cognitive-complexity \
55-
-llvmlibc-restrict-system-libc-headers \
56-
-cppcoreguidelines-pro-type-union-access' \
57-
-header-filter='.*vk_mem_alloc\.h' -p build || true
45+
find . -name '*.cpp' | xargs clang-tidy-15 -p build || true

0 commit comments

Comments
 (0)