-
-
Notifications
You must be signed in to change notification settings - Fork 133
Expand file tree
/
Copy path.clang-tidy
More file actions
53 lines (53 loc) · 4.38 KB
/
Copy path.clang-tidy
File metadata and controls
53 lines (53 loc) · 4.38 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
41
42
43
44
45
46
47
48
49
50
51
52
53
---
Checks:
- '*'
- '-abseil-string-find-str-contains' # 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' # Nice idea but collides with switch statements we'll need to use fall-throughs to fix this, which is also bad.
- '-bugprone-chained-comparison' # Generated by Catch test framework.
- '-bugprone-easily-swappable-parameters' # Can't do much about this in many places.
- '-cert-err58-cpp' # Used in several singleton factory functions. I don't know of a better way to do this and it is rather unlikely that this will be a problem.
- '-cppcoreguidelines-avoid-c-arrays' # Makes sense for some arrays, but especially for char arrays using std::array isn't a good solution.
- '-cppcoreguidelines-avoid-do-while' # Still useful and no better alternative for many cases.
- '-cppcoreguidelines-avoid-magic-numbers' # Generally good advice, but there are too many places where this is useful, for instance in tests.
- '-cppcoreguidelines-owning-memory' # Don't want to add dependency on gsl library.
- '-cppcoreguidelines-pro-bounds-array-to-pointer-decay' # Limited use and many false positives including for all asserts.
- '-cppcoreguidelines-pro-bounds-constant-array-index' # Is needed for low-level code.
- '-cppcoreguidelines-pro-bounds-pointer-arithmetic' # This is a low-level library, it needs to do pointer arithmetic.
- '-cppcoreguidelines-pro-type-const-cast' # When you need it, you need it.
- '-cppcoreguidelines-pro-type-reinterpret-cast' # This is a low-level library, it needs to do reinterpret-casts.
- '-cppcoreguidelines-pro-type-static-cast-downcast' # This is needed and totally okay if we are sure about the types.
- '-cppcoreguidelines-pro-type-vararg' # We need some of these functions at least and for some functions it isn't even clear that those are vararg functions.
- '-fuchsia-*' # Much too strict.
- '-google-runtime-references' # Matter of preference, and we can't change the interfaces now anyway.
- '-hicpp-avoid-c-arrays' # Makes sense for some arrays, but especially for char arrays using std::array isn't a good solution.
- '-hicpp-no-array-decay' # Limited use and many false positives including for all asserts.
- '-hicpp-vararg' # Too strict, sometimes calling vararg functions is necessary.
- '-llvm-prefer-static-over-anonymous-namespace' # Don't want that.
- '-llvm-qualified-auto' # This reports too many cases. Typical case is an iterator that might be a pointer on one system but some special type on another.
- '-llvm-use-ranges' # Doesn't apply.
- '-llvmlibc-*' # Doesn't apply.
- '-misc-include-cleaner' # Too many reports. Disabled for now.
- '-misc-no-recursion' # Nothing wrong with recursion.
- '-misc-unused-parameters' # Can't be fixed, because then Doxygen will complain. (In file include/osmium/area/problem_reporter.hpp).
- '-modernize-avoid-c-arrays' # Makes sense for some arrays, but especially for char arrays using std::array isn't a good solution.
- '-modernize-concat-nested-namespaces' # Too many cases, disabled for the time being.
- '-modernize-raw-string-literal' # Readability isn't that much better, arguably worse because of the new syntax.
- '-modernize-use-nodiscard' # Too many cases, disabled for the time being.
- '-modernize-use-trailing-return-type' # I am not quite that modern.
- '-readability-convert-member-functions-to-static' # Reports too many false positives.
- '-readability-function-cognitive-complexity' # Sometimes the large functions are needed.
- '-readability-identifier-length' # Too strict.
- '-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.
- '-readability-qualified-auto' # Typical case is an iterator that might be a pointer on one system but some special type on another.
- '-readability-redundant-lambda-parameter-list' # Doesn't strike me as more readable.
- '-readability-trailing-comma' # Questionable.
# WarningsAsErrors: '*'
HeaderFilterRegex: '\/include\/osmium\/.*'
CheckOptions:
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: true
...