-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.clang-tidy
More file actions
77 lines (73 loc) · 2.51 KB
/
.clang-tidy
File metadata and controls
77 lines (73 loc) · 2.51 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Checks:
# Add
- bugprone-*,
cert-*,
clang-analyzer-*,
cppcoreguidelines-*,
google-explicit-constructor,
hicpp-*,
misc-*,
performance-*,
readability-*,
# Remove
- -bugprone-easily-swappable-parameters # C++98 is too limited to deal with this (no designated initializers, no compound literals, no scoped enums).
- -misc-use-anonymous-namespace # static for functions is more visible.
- -readability-identifier-length # cppreference.com uses short names too often.
# Aliases
- -cert-dcl37-c,
-cert-dcl51-cpp,
-cert-dcl59-cpp,
-cert-err09-cpp,
-cert-err58-cpp,
-cert-err61-cpp,
-cert-exp42-c,
-cert-msc30-c,
-cert-msc32-c,
-cert-msc50-cpp,
-cert-msc51-cpp,
-cert-oop54-cpp,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-c-copy-assignment-signature,
-cppcoreguidelines-non-private-member-variables-in-classes,
-hicpp-avoid-c-arrays,
-hicpp-avoid-goto,
-hicpp-braces-around-statements,
-hicpp-deprecated-headers,
-hicpp-explicit-conversions,
-hicpp-member-init,
-hicpp-no-array-decay,
-hicpp-no-malloc,
-hicpp-special-member-functions,
-hicpp-uppercase-literal-suffix,
-hicpp-use-auto,
-hicpp-use-equals-delete,
-hicpp-use-nullptr,
-hicpp-vararg,
CheckOptions:
- key: bugprone-empty-catch.IgnoreCatchWithKeywords
value: 'EMPTY: '
- key: misc-const-correctness.WarnPointersAsValues
value: true
- key: misc-const-correctness.TransformPointersAsValues
value: true
- key: misc-const-correctness.TransformPointersAsPointers
value: true
- key: misc-header-include-cycle.IgnoredFilesList
value: '.tpp' # pragma once does not seem to be recognized by clang-tidy.
- key: modernize-deprecated-headers.CheckHeaderFile
value: true
- key: readability-magic-numbers.IgnoredIntegerValues
value: '1;2;3;4;10' # 1-4 are default, 10 for decimal base operations.
- key: readability-magic-numbers.IgnoredFloatingPointValues
value: '1.0;100.0;0.1' # 1.0 and 100.0 are default, 0.1 for decimal base operations.
ExtraArgsBefore:
- -Wall
- -Wextra
- -Wpedantic
- -Wshadow
- -Wdocumentation
- -Wno-pragma-once-outside-header # Avoid 'clang-diagnostic-pragma-once-outside-header' warning when analyzing a header file on its own.
- -std=c++98
- --language=c++
HeaderFileExtensions: ['', 'h', 'hh', 'hpp', 'hxx', 'ipp', 'tpp']
HeaderFilterRegex: '.*' # Show diagnostics from headers when they get included (could be different than when analyzing a header on its own).