-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.clang-tidy
67 lines (65 loc) · 2.61 KB
/
.clang-tidy
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
---
#
# Clang-Tidy configuration for simSYCL.
#
# There are three usage scenarios:
# 1. Automatic checks through an IDE (CLion, VsCode, ...)
# 2. Running manually on select files (not recommended)
# `clang-tidy -p path/to/compile_commands.json file1 [file2, ...]`
# Note: A script for running clang-tidy on all Celerity sources is provided in `ci/run-clang-tidy.sh`
# 3. Running on a diff (for CI)
# `git diff -U0 --no-color | clang-tidy-diff.py -p1 -path path/to/compile_commands.json`
#
InheritParentConfig: false
# See https://clang.llvm.org/extra/clang-tidy/checks/list.html for a full list of available checks.
# Note: We would like to enable `misc-const-correctness` (introduced with Clang 15), but it currently
# seems to be somewhat buggy still (producing false positives) => revisit at some point.
Checks: -*,
readability-*,
-readability-avoid-const-params-in-decls,
-readability-function-cognitive-complexity,
-readability-identifier-length,
-readability-magic-numbers,
-readability-uppercase-literal-suffix,
-readability-convert-member-functions-to-static
-readability-qualified-auto
CheckOptions:
# Naming conventions
- key: readability-identifier-naming.ClassCase
value: lower_case
- key: readability-identifier-naming.ClassMethodCase
value: lower_case
- key: readability-identifier-naming.EnumCase
value: lower_case
- key: readability-identifier-naming.EnumConstantCase
value: lower_case
- key: readability-identifier-naming.FunctionCase
value: lower_case
- key: readability-identifier-naming.LocalVariableCase
value: lower_case
- key: readability-identifier-naming.LocalVariableIgnoredRegexp
# Allow single-letter uppercase variable names
value: "[A-Z]"
- key: readability-identifier-naming.ParameterCase
value: lower_case
- key: readability-identifier-naming.ParameterIgnoredRegexp
# Allow single-letter uppercase function parameters
value: "[A-Z]"
- key: readability-identifier-naming.ProtectedMemberCase
value: lower_case
- key: readability-identifier-naming.ProtectedMemberPrefix
value: m_
- key: readability-identifier-naming.PrivateMemberCase
value: lower_case
- key: readability-identifier-naming.PrivateMemberPrefix
value: m_
- key: readability-identifier-naming.TemplateParameterCase
value: CamelCase
# Other coding conventions
- key: readability-braces-around-statements.ShortStatementLines
# Allow control-flow statements w/o braces when on a single line
value: 1
# Treat naming violations as errors
WarningsAsErrors: "readability-identifier-naming"
# Use .clang-format configuration for fixes
FormatStyle: file