forked from libjxl/libjxl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-tidy
87 lines (82 loc) · 3.11 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
# Disabled checks:
# - modernize-deprecated-headers: We don't use std:: versions of the standard
# types and functions like size_t or printf, so we should include <stdio.h>
# instead <cstdio>.
# - modernize-return-braced-init-list: this often doesn't improve readability.
# - modernize-use-auto: is too aggressive towards using auto.
# - modernize-use-default-member-init: with a mix of constructors and default
# member initialization this can be confusing if enforced.
# - modernize-use-trailing-return-type: does not improve readability when used
# systematically.
# - modernize-use-using: typedefs are ok.
#
# - readability-else-after-return: It doesn't always improve readability.
# - readability-static-accessed-through-instance
# It is often more useful and readable to access a constant of a passed
# variable (like d.N) instead of using the type of the variable that could be
# long and complex.
# - readability-uppercase-literal-suffix: we write 1.0f, not 1.0F.
Checks: >-
bugprone-*,
clang-*,
-clang-diagnostic-unused-command-line-argument,
google-*,
modernize-*,
performance-*,
readability-*,
-bugprone-branch-clone,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-infinite-loop,
-bugprone-narrowing-conversions,
-bugprone-unused-local-non-trivial-variable,
-modernize-avoid-c-arrays,
-modernize-concat-nested-namespaces,
-modernize-deprecated-headers,
-modernize-return-braced-init-list,
-modernize-type-traits,
-modernize-use-auto,
-modernize-use-default-member-init,
-modernize-use-nodiscard,
-modernize-use-trailing-return-type,
-modernize-use-using,
-performance-enum-size,
-readability-avoid-nested-conditional-operator,
-readability-else-after-return,
-readability-function-cognitive-complexity,
-readability-identifier-length,
-readability-magic-numbers,
-readability-redundant-access-specifiers,
-readability-simplify-boolean-expr,
-readability-static-accessed-through-instance,
-readability-suspicious-call-argument,
-readability-uppercase-literal-suffix,
-readability-use-anyofallof,
WarningsAsErrors: >-
bugprone-argument-comment,
bugprone-macro-parentheses,
bugprone-suspicious-string-compare,
bugprone-use-after-move,
clang-*,
clang-analyzer-*,
-clang-diagnostic-unused-command-line-argument,
google-build-using-namespace,
google-explicit-constructor,
google-readability-braces-around-statements,
google-readability-namespace-comments,
modernize-use-override,
readability-inconsistent-declaration-parameter-name
# We are only interested in the headers from this projects, excluding
# third_party/ and build/.
HeaderFilterRegex: '^.*/(lib|tools)/.*\.h$'
CheckOptions:
- key: readability-braces-around-statements.ShortStatementLines
value: '2'
- key: google-readability-braces-around-statements.ShortStatementLines
value: '2'
- key: readability-implicit-bool-conversion.AllowPointerConditions
value: '1'
- key: readability-implicit-bool-conversion.AllowIntegerConditions
value: '1'
- key: bugprone-signed-char-misuse.CharTypdefsToIgnore
value: 'int8_t'