forked from sxs-collaboration/spectre
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-tidy
113 lines (113 loc) · 4.2 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
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
106
107
108
109
110
111
112
113
# Define the checks we want to use and remove with comments as to why.
#
# Here is a list of the quirks with clang-tidy file format:
# - no apostrophes in the comments
# - every comment line in the checks must end with a comma
# - every line in the checks must start at the beginning of the line
Checks: '*,
-abseil-*,
-altera-*,
-android-*,
-bugprone-easily-swappable-parameters,
-bugprone-exception-escape,
# complains about Catch macros having infinite loops,
-bugprone-infinite-loop,
-bugprone-macro-parentheses,
# useless as it triggers on calls to value() which already do a check,
# and is too aggressive as it requires the check to be immediately before the
# access.
-bugprone-unchecked-optional-access,
# Official justification is not public, unofficial justification has nothing,
# specific to iterators and is basically "never create mutable temporaries",,
# which is against standard practice everywhere else.,
-cert-dcl21-cpp,
# many static variables we use do not throw and if they do we,
# want to terminate anyway,
-cert-err58-cpp,
-cert-msc51-cpp,
-cert-msc32-c,
# checks for incorrectly implemented self-assignment,
# checks. However, it is broken.,
-cert-oop54-cpp,
-cppcoreguidelines-avoid-c-arrays,
# too many inconvenient positives for us to deal with,
-cppcoreguidelines-avoid-magic-numbers,
# false positives,
-cppcoreguidelines-c-copy-assignment-signature,
# sometimes macros are the right answer.,
-cppcoreguidelines-macro-usage,
# public and protected member variables are fine,
-cppcoreguidelines-non-private-member-variables-in-classes,
# We do not use gsl::owner,
-cppcoreguidelines-owning-memory,
-fuchsia-*,
# defaulting virtual functions in CoordinateMap,
-google-default-arguments,
# specifying int32_t and int64_t instead of just int,
-google-runtime-int,
# redundant with other checks,
-hicpp-*,
# We use pragma once instead of include guards,
-llvm-header-guard,
# Makes code less portable because some implementation-defined STL,
# types can be pointers or not. Same as,
# readability-qualified-auto below,
-llvm-qualified-auto,
# We are not developing LLVM libc,
-llvmlibc-*,
# Triggers when "l" is used because it is "too similar" to "I",
-misc-confusable-identifiers,
# thinks constexpr variables in header files cause ODR violations,
-misc-definitions-in-headers,
# false positives,
-misc-noexcept-move-constructor,
-misc-non-private-member-variables-in-classes,
# false positives,
-misc-unconventional-assign-operator,
-modernize-raw-string-literal,
# should be used, but requires possibly a lot of code changes that,
# we do not have the resources for,
-modernize-use-nodiscard,
# this wants everything to use trailing return type syntax, which,
# is silly.,
-modernize-use-trailing-return-type,
-performance-noexcept-move-constructor,
# complains about decltype(auto),
-readability-const-return-type,
# style choice, discussed in issue #145,
-readability-else-after-return,
-llvm-else-after-return,
# flagged code that is not very complex,
-readability-function-cognitive-complexity,
# We have lots of "x", "p", & "os" variable names,
-readability-identifier-length,
-readability-magic-numbers,
-misc-confusable-identifiers
# Same as llvm-qualified-auto above.,
-readability-qualified-auto,
# Access specifiers can be useful to structure code,
-readability-redundant-access-specifiers,
# We can have two of: methods are static when possible, static,
# methods are not called through instances, and methods of,
# calling, e.g., x.size(), are consistent across classes. We,
# choose to lose this one.,
-readability-static-accessed-through-instance,
# we are okay with lower case,
-readability-uppercase-literal-suffix,'
CheckOptions:
- key: cppcoreguidelines-avoid-do-while.IgnoreMacros
value: true
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctions
value: true
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
value: true
- key: performance-move-const-arg.CheckTriviallyCopyableMove
value: false
# The fix for this is not supported by GCC 9.
- key: modernize-loop-convert.UseCxx20ReverseRanges
value: false
WarningsAsErrors: '*'
# It is unclear if the header filter actually works or how to use it so
# just include all headers
HeaderFilterRegex: ''
FormatStyle: none