forked from google/xls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-tidy
93 lines (92 loc) · 3.35 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
# readability-make-member-function-const is great, but it also suggests that
# in cases where we return a non-const pointer. So good to check, not by
# default.
#
# readability-qualified-auto is useful in general, however it suggests
# to convert iterators (e.g. std::string_view::begin()) to the pointer it
# returns; however since the iterator is implementation defined, this is not
# a valid assertion. Running the check every now and then manually and
# fixing all the non-iterator cases is useful though. Off by default.
#
# readability-use-anyofallof is overly aggressive, suggesting conversion of for
# loops into std::any_of/all_of in cases where it makes the code less
# readable.
#
# misc-const-correctness: useful, but it seems to be overzealous at times,
# arriving at incorrect conclusions.
#
# modernize-make-unique: mostly correct, but wants to also replace .reset()
# which is a more readable way than assign.
#
# modernize-loop-convert: Improper use of auto for loop variable.
#
# misc-use-anonymous-namespace: Using static on non-member functions has the
# essentially the same effect as putting them in an anonymous namespace and
# has added benefits -- including, having the statement of internal linkage
# right by the function definition.
#
# NOTE: Below, there must be no comments, otherwise clang tidy silently ignores
# rules... (ask me how I know).
###
Checks: >
clang-diagnostic-*,
-clang-diagnostic-sign-conversion,
clang-analyzer-*,
abseil-*,
-abseil-no-namespace,
readability-*,
-readability-convert-member-functions-to-static,
-readability-function-cognitive-complexity,
-readability-identifier-length,
-readability-isolate-declaration,
-readability-magic-numbers,
-readability-make-member-function-const,
-readability-named-parameter,
-readability-qualified-auto,
-readability-redundant-access-specifiers,
-readability-simplify-boolean-expr,
-readability-static-definition-in-anonymous-namespace,
-readability-uppercase-literal-suffix,
-readability-use-anyofallof,
google-*,
-google-readability-braces-around-statements,
-google-readability-todo,
performance-*,
-performance-noexcept-*,
bugprone-*,
-bugprone-branch-clone,
-bugprone-easily-swappable-parameters,
-bugprone-exception-escape,
-bugprone-macro-parentheses,
-bugprone-move-forwarding-reference,
-bugprone-narrowing-conversions,
-bugprone-suspicious-missing-comma,
-bugprone-unchecked-optional-access,
modernize-*,
-modernize-avoid-bind,
-modernize-avoid-c-arrays,
-modernize-concat-nested-namespaces,
-modernize-loop-convert,
-modernize-make-unique,
-modernize-pass-by-value,
-modernize-raw-string-literal,
-modernize-return-braced-init-list,
-modernize-use-auto,
-modernize-use-default-member-init,
-modernize-use-emplace,
-modernize-use-nodiscard,
-modernize-use-trailing-return-type,
-modernize-use-transparent-functors,
misc-*,
-misc-const-correctness,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
-misc-redundant-expression,
-misc-unused-parameters,
-misc-use-anonymous-namespace,
-cppcoreguidelines-narrowing-conversions,
CheckOptions:
- key: readability-implicit-bool-conversion.AllowPointerConditions
value: 'true'
- key: readability-implicit-bool-conversion.AllowIntegerConditions
value: 'true'