Debian Codegraph @

.clang-tidy

raw
1 ---
2 Checks: '*,-abseil-string-find-str-contains,-altera-*,-android-cloexec-*,-boost-use-ranges,-bugprone-branch-clone,-bugprone-chained-comparison,-bugprone-easily-swappable-parameters,-bugprone-macro-parentheses,-cert-dcl21-cpp,-cert-err58-cpp,-clang-analyzer-optin.cplusplus.VirtualCall,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-avoid-do-while,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-macro-usage,-cppcoreguidelines-non-private-member-variables-in-classes,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-vararg,-fuchsia-*,-google-runtime-references,-hicpp-avoid-c-arrays,-hicpp-invalid-access-moved,-hicpp-no-array-decay,-hicpp-no-assembler,-hicpp-vararg,-llvmlibc-*,-llvm-qualified-auto,-misc-include-cleaner,-misc-macro-parentheses,-misc-non-private-member-variables-in-classes,-misc-no-recursion,-misc-unused-parameters,-modernize-avoid-c-arrays,-modernize-raw-string-literal,-modernize-use-trailing-return-type,-portability-template-virtual-member-function,-readability-avoid-const-params-in-decls,-readability-convert-member-functions-to-static,-readability-function-cognitive-complexity,-readability-identifier-length,-readability-implicit-bool-cast,-readability-implicit-bool-conversion,-readability-magic-numbers,-readability-qualified-auto'
3 #
4 # For a list of check options, see:
5 # https://clang.llvm.org/extra/clang-tidy/checks/list.html
6 #
7 # Disabled checks:
8 #
9 # abseil-string-find-str-contains
10 # We don't want the dependency.
11 #
12 # altera-*
13 # Doesn't apply.
14 #
15 # android-cloexec-*
16 # O_CLOEXEC isn't available on Windows making this non-portable.
17 #
18 # boost-use-ranges
19 # Would introduce extra dependency on boost.
20 #
21 # bugprone-branch-clone
22 # Nice idea but collides but with switch statements we'll need to use
23 # fall-throughs to fix this, which is also bad.
24 #
25 # bugprone-chained-comparison
26 # These are generated by our test framework.
27 #
28 # bugprone-easily-swappable-parameters
29 # Interesting test, but not something we can do much about in many places.
30 #
31 # bugprone-macro-parentheses
32 # False positive in the only place where it reports something and
33 # disabling locally doesn't work.
34 #
35 # cert-dcl21-cpp
36 # It is unclear whether this is still a good recommendation in modern C++.
37 #
38 # cert-err58-cpp
39 # Used in several singelton factory functions. I don't know of a better
40 # way to do this and it is rather unlikely that this will be a problem.
41 #
42 # clang-analyzer-optin.cplusplus.VirtualCall
43 # Disable a warning we get from the Catch test framework.
44 #
45 # cppcoreguidelines-avoid-c-arrays
46 # Alias for modernize-avoid-c-arrays.
47 #
48 # cppcoreguidelines-avoid-do-while
49 # Still useful and no better alternative for many cases.
50 #
51 # cppcoreguidelines-avoid-magic-numbers
52 # Generally good advice, but there are too many places where this is
53 # useful, for instance in tests.
54 #
55 # cppcoreguidelines-macro-usage
56 # There are cases where we actually need macros.
57 #
58 # cppcoreguidelines-non-private-member-variables-in-classes
59 # Alias for misc-non-private-member-variables-in-classes
60 #
61 # cppcoreguidelines-owning-memory
62 # Don't want to add dependency on gsl library.
63 #
64 # cppcoreguidelines-pro-bounds-array-to-pointer-decay
65 # Limited use and many false positives including for all asserts.
66 #
67 # cppcoreguidelines-pro-bounds-constant-array-index
68 # Is needed for low-level code.
69 #
70 # cppcoreguidelines-pro-bounds-pointer-arithmetic
71 # This is a low-level library, it needs to do pointer arithmetic.
72 #
73 # cppcoreguidelines-pro-type-const-cast
74 # When you need it, you need it.
75 #
76 # cppcoreguidelines-pro-type-reinterpret-cast
77 # This is a low-level library, it needs to do reinterpret-casts.
78 #
79 # cppcoreguidelines-pro-type-static-cast-downcast
80 # This is needed and totally okay if we are sure about the types.
81 #
82 # cppcoreguidelines-pro-type-vararg
83 # We need some of these functions at least and for some functions it isn't
84 # even clear that those are vararg functions.
85 #
86 # fuchsia-*
87 # Much too strict.
88 #
89 # google-runtime-references
90 # This is just a matter of preference, and we can't change the interfaces
91 # now anyways.
92 #
93 # hicpp-avoid-c-arrays
94 # Alias for modernize-avoid-c-arrays.
95 #
96 # hicpp-invalid-access-moved
97 # Creates false positives.
98 #
99 # hicpp-no-array-decay
100 # Alias for cppcoreguidelines-pro-bounds-array-to-pointer-decay.
101 #
102 # hicpp-no-assembler
103 # Reports are from macros we don't have any control over.
104 #
105 # hicpp-vararg
106 # Too strict, sometimes calling vararg functions is necessary.
107 #
108 # llvm-qualified-auto
109 # readability-qualified-auto
110 # This reports too many cases. Typical case is an iterator that might be
111 # a pointer on one system but some special type on another.
112 #
113 # llvmlibc-*
114 # Doesn't apply to us.
115 #
116 # misc-include-cleaner
117 # Too many reports. Disabled for now.
118 #
119 # misc-macro-parentheses
120 # Old name for bugprone-macro-parentheses.
121 #
122 # misc-non-private-member-variables-in-classes
123 # Reports this also for structs, which doesn't make any sense. There is
124 # an option "IgnoreClassesWithAllMemberVariablesBeingPublic" which should
125 # disable this, but it didn't work for me.
126 #
127 # misc-no-recursion
128 # There is nothing wrong with recursion.
129 #
130 # misc-unused-parameters
131 # Can't be fixed, because then Doxygen will complain. (In file
132 # include/osmium/area/problem_reporter.hpp).
133 #
134 # modernize-avoid-c-arrays
135 # Makes sense for some array, but especially for char arrays using
136 # std::array isn't a good solution.
137 #
138 # modernize-raw-string-literal
139 # Readability isn't that much better, arguably worse because of the new
140 # syntax.
141 #
142 # modernize-use-trailing-return-type
143 # I am not quite that modern.
144 #
145 # portability-template-virtual-member-function
146 # There is a bunch of these mostly for functions specified as =0. Totally
147 # unclear what this is supposed to tell me.
148 #
149 # readability-avoid-const-params-in-decls
150 # This is header only library, so the declaration and implementation are
151 # often the same and we want to have the const in implementations.
152 #
153 # readability-convert-member-functions-to-static
154 # Reports too many false positives
155 #
156 # readability-function-cognitive-complexity
157 # Sometimes the large functions are needed.
158 #
159 # readability-identifier-length
160 # Too strict.
161 #
162 # readability-implicit-bool-cast
163 # Old name for readability-implicit-bool-conversion.
164 #
165 # readability-implicit-bool-conversion
166 # I don't think this makes the code more readable.
167 #
168 # readability-magic-numbers
169 # Alias for cppcoreguidelines-avoid-magic-numbers.
170 #
171 #WarningsAsErrors: '*'
172 HeaderFilterRegex: '\/include\/osmium\/.*'
173 ...