Debian Codegraph @

.clang-tidy

raw
1 # Disabled checks:
2 # - modernize-deprecated-headers: We don't use std:: versions of the standard
3 # types and functions like size_t or printf, so we should include <stdio.h>
4 # instead <cstdio>.
5 # - modernize-return-braced-init-list: this often doesn't improve readability.
6 # - modernize-use-auto: is too aggressive towards using auto.
7 # - modernize-use-default-member-init: with a mix of constructors and default
8 # member initialization this can be confusing if enforced.
9 # - modernize-use-trailing-return-type: does not improve readability when used
10 # systematically.
11 # - modernize-use-using: typedefs are ok.
12 #
13 # - readability-else-after-return: It doesn't always improve readability.
14 # - readability-static-accessed-through-instance
15 # It is often more useful and readable to access a constant of a passed
16 # variable (like d.N) instead of using the type of the variable that could be
17 # long and complex.
18 # - readability-uppercase-literal-suffix: we write 1.0f, not 1.0F.
19
20 Checks: >-
21 bugprone-*,
22 clang-*,
23 -clang-diagnostic-unused-command-line-argument,
24 google-*,
25 modernize-*,
26 performance-*,
27 readability-*,
28 -bugprone-branch-clone,
29 -bugprone-easily-swappable-parameters,
30 -bugprone-implicit-widening-of-multiplication-result,
31 -bugprone-infinite-loop,
32 -bugprone-narrowing-conversions,
33 -bugprone-unused-local-non-trivial-variable,
34 -modernize-avoid-c-arrays,
35 -modernize-concat-nested-namespaces,
36 -modernize-deprecated-headers,
37 -modernize-return-braced-init-list,
38 -modernize-type-traits,
39 -modernize-use-auto,
40 -modernize-use-default-member-init,
41 -modernize-use-nodiscard,
42 -modernize-use-trailing-return-type,
43 -modernize-use-using,
44 -performance-enum-size,
45 -readability-avoid-nested-conditional-operator,
46 -readability-else-after-return,
47 -readability-function-cognitive-complexity,
48 -readability-identifier-length,
49 -readability-magic-numbers,
50 -readability-redundant-access-specifiers,
51 -readability-simplify-boolean-expr,
52 -readability-static-accessed-through-instance,
53 -readability-suspicious-call-argument,
54 -readability-uppercase-literal-suffix,
55 -readability-use-anyofallof,
56
57
58 WarningsAsErrors: >-
59 bugprone-argument-comment,
60 bugprone-macro-parentheses,
61 bugprone-suspicious-string-compare,
62 bugprone-use-after-move,
63 clang-*,
64 clang-analyzer-*,
65 -clang-diagnostic-unused-command-line-argument,
66 google-build-using-namespace,
67 google-explicit-constructor,
68 google-readability-braces-around-statements,
69 google-readability-namespace-comments,
70 modernize-use-override,
71 readability-inconsistent-declaration-parameter-name
72
73 # We are only interested in the headers from this projects, excluding
74 # third_party/ and build/.
75 HeaderFilterRegex: '^.*/(lib|tools)/.*\.h$'
76
77 CheckOptions:
78 - key: readability-braces-around-statements.ShortStatementLines
79 value: '2'
80 - key: google-readability-braces-around-statements.ShortStatementLines
81 value: '2'
82 - key: readability-implicit-bool-conversion.AllowPointerConditions
83 value: '1'
84 - key: readability-implicit-bool-conversion.AllowIntegerConditions
85 value: '1'
86 - key: bugprone-signed-char-misuse.CharTypdefsToIgnore
87 value: 'int8_t'