-
-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy path.clang-tidy
More file actions
40 lines (40 loc) · 2.95 KB
/
Copy path.clang-tidy
File metadata and controls
40 lines (40 loc) · 2.95 KB
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
---
Checks:
# For a list of checks, see:
# https://clang.llvm.org/extra/clang-tidy/checks/list.html
- '*'
- '-abseil-*' # Not using abseil.
- '-altera-*' # Doesn't apply.
- '-android-cloexec-*' # O_CLOEXEC not available on Windows, is non-portable.
- '-boost-use-ranges' # Would introduce extra dependency on boost.
- '-bugprone-branch-clone' # There are several cases in this code where the code seems much more readable with branch clones than without.
- '-bugprone-chained-comparison' # Generated by Catch test framework.
- '-bugprone-easily-swappable-parameters' # Can't do much about this in many places.
- '-cppcoreguidelines-avoid-c-arrays' # Makes sense for some arrays, but especially for char arrays using std::array isn't a good solution.
- '-cppcoreguidelines-avoid-magic-numbers' # Generally good advice, but there are too many places where this is useful, for instance in tests.
- '-cppcoreguidelines-pro-bounds-constant-array-index' # Don't want to add dependency on gsl library.
- '-cppcoreguidelines-pro-bounds-pointer-arithmetic' # Difficult to get by without it...
- '-cppcoreguidelines-pro-type-static-cast-downcast' # This is needed and totally okay if we are sure about the types.
- '-cppcoreguidelines-pro-type-vararg' # Sometimes calling vararg functions is necessary.
- '-fuchsia-*' # Much too strict.
- '-hicpp-avoid-c-arrays' # Makes sense for some arrays, but especially for char arrays using std::array isn't a good solution.
- '-hicpp-vararg' # Sometimes calling vararg functions is necessary.
- '-llvm-prefer-static-over-anonymous-namespace' # Matter of taste and we are not following this one.
- '-llvmlibc-*' # Not applicable.
- '-misc-include-cleaner' # Too many reports. Disabled for now.
- '-misc-no-recursion' # Nothing wrong with recursion.
- '-modernize-avoid-c-arrays' # Makes sense for some arrays, but especially for char arrays using std::array isn't a good solution.
- '-modernize-use-nodiscard' # Maybe good for a library, but overkill for an application.
- '-modernize-use-trailing-return-type' # I am not quite that modern.
- '-readability-convert-member-functions-to-static' # Not a bad idea, but it is overzealous when there are member functions overwritten in child classes and some of them can't be static.
- '-readability-function-cognitive-complexity' # Some functions need to be larger.
- '-readability-identifier-length' # Short identifiers are sometimes okay.
- '-readability-implicit-bool-conversion' # I don't think this makes the code more readable.
- '-readability-magic-numbers' # Generally good advice, but there are too many places where this is useful, for instance in tests.
# WarningsAsErrors: '*'
CheckOptions:
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: true
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: true
...