-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.clang-tidy
More file actions
105 lines (100 loc) · 3.58 KB
/
Copy path.clang-tidy
File metadata and controls
105 lines (100 loc) · 3.58 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
---
Checks: >-
bugprone-*,
cert-*,
clang-analyzer-*,
concurrency-*,
cppcoreguidelines-*,
llvm-*,
misc-*,
modernize-*,
performance-*,
portability-*,
readability-*,
-abseil-*,
-altera-*,
-android-*,
-boost-*,
-darwin-*,
-fuchsia-*,
-google-*,
-hicpp-*,
-linuxkernel-*,
-llvmlibc-*,
-mpi-*,
-objc-*,
-openmp-*,
-webkit-*,
-zircon-*,
-bugprone-easily-swappable-parameters,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-non-private-member-variables-in-classes,
-llvm-header-guard,
-llvm-prefer-isa-or-dyn-cast-in-conditionals,
-llvm-prefer-register-over-unsigned,
-llvm-twine-local,
-llvm-use-new-mlir-op-builder,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
-misc-use-anonymous-namespace,
-performance-enum-size,
-portability-restrict-system-includes,
-readability-identifier-length,
-readability-magic-numbers,
-clang-analyzer-optin.cplusplus.UninitializedObject,
-clang-analyzer-optin.core.EnumCastOutOfRange
# clang-analyzer-optin.cplusplus.UninitializedObject is disabled above:
# it false-positives on toml++'s formatter classes, which deliberately
# leave some fields uninitialized in the constructor and set them later
# in attach(). The diagnostic is anchored inside the vendored header
# itself, so it can't be suppressed with a NOLINT at the call site.
#
# clang-analyzer-optin.core.EnumCastOutOfRange is disabled above for the
# same reason: it false-positives on toml++'s TOML_MAKE_FLAGS macro,
# whose generated operator~ deliberately bitwise-inverts a flag enum's
# underlying value, producing a result with no matching named
# enumerator by design. The diagnostic is anchored inside the vendored
# header itself (in the macro body), so it can't be suppressed with a
# NOLINT at the call site.
WarningsAsErrors: '*'
# Warn on the project's own headers only, via an explicit allowlist of
# first-party subdirectories under src/. This must be an allowlist rather
# than a "not extern/" exclusion because llvm::Regex (POSIX ERE, used to
# evaluate this option) has no lookahead support, so a negative-lookahead
# pattern (e.g. the previous '.*/src/(?!pcg-cpp)') silently fails to
# exclude anything, and every header under src/ -- including vendored
# third-party code in src/extern -- has effectively been unfiltered all
# along.
HeaderFilterRegex: '.*/src/(core|interpolation|io|nebular|pdfs|phot|pybind|specsyn|tracks|utils)/'
FormatStyle: 'llvm'
CheckOptions:
# Naming conventions matching project style (camelBack methods/members,
# trailing underscore on members, CamelCase types, lower_case namespaces)
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.StructCase
value: CamelCase
- key: readability-identifier-naming.FunctionCase
value: camelBack
- key: readability-identifier-naming.MethodCase
value: camelBack
- key: readability-identifier-naming.MemberCase
value: camelBack
- key: readability-identifier-naming.MemberSuffix
value: '_'
- key: readability-identifier-naming.VariableCase
value: camelBack
- key: readability-identifier-naming.ParameterCase
value: camelBack
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantCase
value: camelBack
- key: readability-identifier-naming.TypeAliasCase
value: CamelCase
- key: readability-identifier-naming.TypedefCase
value: camelBack
- key: readability-identifier-naming.TemplateParameterCase
value: CamelCase