-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy path.clang-tidy
More file actions
58 lines (58 loc) · 3.16 KB
/
Copy path.clang-tidy
File metadata and controls
58 lines (58 loc) · 3.16 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
---
# https://clang.llvm.org/extra/clang-tidy/
# https://clang.llvm.org/extra/clang-tidy/checks/list.html
#
# We disabled alias rules if they make nolinting findings a pain
#
# Disabled checks:
# altera-* : Performance oriented checks which are too low level for our scope
# llvm* : LLVM project specific checks and best practices not relevant for us
# boost-use-ranges : We prefer using the standard library whenever feasible
# bugprone-easily-swappable-parameters : Not helpful as we are not creating a library which users could misuse by accident
# clang-analyzer-cplusplus.NewDeleteLeaks : Too many false positives for using std::unique_ptr with C++11
# clang-analyzer-optin.core.EnumCastOutOfRange : We would like to use this, but this is incompatible to boost::regex and ExcludeHeaderFilterRegex is not working for clang-analyzer-*
# fuchsia-default-arguments-calls : Default arguments are often parts of established APIs, the check is too opinionated
# fuchsia-default-arguments-declarations : We prefer the lean usage offered by default values.
# hicpp-avoid-c-arrays : Alias to cppcoreguidelines-avoid-c-arrays
# hicpp-member-init : Alias to cppcoreguidelines-pro-type-member-init
# hicpp-no-array-decay : Alias to cppcoreguidelines-pro-bounds-array-to-pointer-decay
# misc-non-private-member-variables-in-classes : Alias to cppcoreguidelines-non-private-member-variables-in-classes
# modernize-avoid-c-arrays : Alias to cppcoreguidelines-avoid-c-arrays
# modernize-make-unique : Not compatible to C++11
# modernize-type-traits : Not compatible to C++11
# modernize-use-default-member-init : Alias to cppcoreguidelines-use-default-member-init
# modernize-use-nodiscard : Not compatible to C++11
# modernize-use-trailing-return-type : We prefer the classic style
# readability-function-cognitive-complexity : Too opinionated, we split up functions based on our own experience
# readability-magic-numbers : Alias to cppcoreguidelines-avoid-magic-numbers
# readability-redundant-member-init : We prefer a consistent initializer style, even if some of them are redundant
Checks: >
*,
-altera-*,
-llvm*,
-boost-use-ranges,
-bugprone-easily-swappable-parameters,
-clang-analyzer-cplusplus.NewDeleteLeaks,
-clang-analyzer-optin.core.EnumCastOutOfRange,
-fuchsia-default-arguments-calls,
-fuchsia-default-arguments-declarations,
-hicpp-avoid-c-arrays,
-hicpp-member-init,
-hicpp-no-array-decay,
-misc-non-private-member-variables-in-classes,
-modernize-avoid-c-arrays,
-modernize-make-unique,
-modernize-type-traits,
-modernize-use-default-member-init,
-modernize-use-nodiscard,
-modernize-use-trailing-return-type,
-readability-function-cognitive-complexity,
-readability-magic-numbers,
-readability-redundant-member-init
# Abort on findings to ensure we don't overlook new findings by accident
WarningsAsErrors: "*"
# Without this findings in header files are ignored. LLVM 22.0 will make showing findings from non system headers the default.
HeaderFilterRegex: ".*"
CheckOptions:
- key: misc-include-cleaner.IgnoreHeaders
value: 'boost/regex.*'