11---
22# Configure clang-tidy for this project.
33
4- # Disabled:
5- # -google-readability-namespace-comments the *_CLIENT_NS is a macro, and
6- # clang-tidy fails to match it against the initial value.
4+ # Here is an explanation for why some of the checks are disabled:
5+ #
6+ # -google-readability-namespace-comments: the *_CLIENT_NS is a macro, and
7+ # clang-tidy fails to match it against the initial value.
8+ #
9+ # -modernize-return-braced-init-list: We think removing typenames and using
10+ # only braced-init can hurt readability.
11+ #
12+ # -performance-move-const-arg: This warning requires the developer to
13+ # know/care more about the implementation details of types/functions than
14+ # should be necessary. For example, `A a; F(std::move(a));` will trigger a
15+ # warning IFF `A` is a trivial type (and therefore the move is
16+ # meaningless). It would also warn if `F` accepts by `const&`, which is
17+ # another detail that the caller need not care about.
18+ #
19+ # -readability-redundant-declaration: A friend declaration inside a class
20+ # counts as a declaration, so if we also declare that friend outside the
21+ # class in order to document it as part of the public API, that will
22+ # trigger a redundant declaration warning from this check.
723Checks : >
824 -*,
925 bugprone-*,
@@ -13,16 +29,23 @@ Checks: >
1329 performance-*,
1430 portability-*,
1531 readability-*,
32+ -google-readability-braces-around-statements,
1633 -google-readability-namespace-comments,
1734 -google-runtime-references,
1835 -misc-non-private-member-variables-in-classes,
36+ -modernize-return-braced-init-list,
37+ -performance-move-const-arg,
1938 -readability-named-parameter,
2039 -readability-braces-around-statements,
21- -readability-magic-numbers
40+ -readability-magic-numbers,
41+ -readability-redundant-declaration
2242
2343# Turn all the warnings from the checks above into errors.
2444WarningsAsErrors : " *"
2545
46+ # Enable clang-tidy checks in our headers.
47+ HeaderFilterRegex : " google/cloud/spanner/.*"
48+
2649CheckOptions :
2750 - { key: readability-identifier-naming.NamespaceCase, value: lower_case }
2851 - { key: readability-identifier-naming.ClassCase, value: CamelCase }
0 commit comments