-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-tidy
84 lines (84 loc) · 3.81 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
---
# Why disable some?
# blanket disables:
# mostly very specific warnings, rarely actionable here
# cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays:
# Avoiding std::array is the whole point of this exercise, even in test code
# cppcoreguidelines-avoid-const-or-ref-data-members
# Current architecture is built around storing refs to things that live longer,
# changing those to raw-pointers don't really make it better.
# cppcoreguidelines-avoid-do-while:
# I think this has its place and can be more descriptive of the intent than
# the alternative with just a straight while-loop
# cppcoreguidelines-pro-bounds-pointer-arithmetic:
# These are allocators and raw containers where pointer arithmetic seems unavoidable
# in many cases. Should try to use Span where possible, though.
# cppcoreguidelines-avoid-magic-numbers, readability-magic-numbers:
# Requiring a named constant for a default value seems riddiculous
# The constant would be named ~identically to the variable
# cppcoreguidelines-macro-usage:
# Situational, for dependencies only
# cppcoreguidelines-non-private-member-variables-in-classes, misc-non-private-member-variables-in-classes:
# Having a trivial public setter is dumb.
# cppcoreguidelines-pro-type-cstyle-cast:
# const_cast is the one that might blow appendages here, but c++ casts make
# this type of code really hard to read. I'll take over the potential bugs over
# the cognitive overhead that also causes bugs.
# cppcoreguidelines-pro-type-reinterpret-cast:
# These are container and allocator implementations, this seems to come with
# the territory.
# misc-const-correctness:
# Tests have to exercise both const and non-const paths
# TODO: Can this be disabled for tests only and still run for template code in library?
# misc-use-anonymous-namespace:
# Header only
# modernize-use-trailing-return-type:
# Haven't touched professionally, best not add 'noise'
# modernize-use-auto:
# Let's not. Better be explicit and consistent unless types are really, really long.
# readability-container-size-empty:
# Test code has to check size() == 0 as well
# readability-function-cognitive-complexity,readability-function-size:
# catch2 test cases these as well
# readability-braces-around-statements:
# clang-format and indentation makes this moot
# readability-identifier-length:
# Iterators are well established in common practice, some variables match source papers
# readability-uppercase-literal-suffix:
# Only really needed for 'l' and my font/highlighting is clear even if I use it
Checks: "*,
-abseil-*,
-altera-*,
-android-*,
-fuchsia-*,
-google-*,
-hicpp-*,
-llvm*,
-zircon-*,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-avoid-const-or-ref-data-members,
-cppcoreguidelines-avoid-do-while,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-narrowing-conversions,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-cstyle-cast,
-cppcoreguidelines-pro-type-reinterpret-cast,
-misc-const-correctness,
-misc-non-private-member-variables-in-classes,
-misc-use-anonymous-namespace,
-modernize-avoid-c-arrays,
-modernize-use-trailing-return-type,
-modernize-use-auto,
-readability-container-size-empty,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-braces-around-statements,
-readability-identifier-length,
-readability-magic-numbers,
-readability-uppercase-literal-suffix,
"
WarningsAsErrors: ''
HeaderFilterRegex: '.*/prosper/include/.*'
FormatStyle: file