generated from tier4/ros2-project-template
-
Notifications
You must be signed in to change notification settings - Fork 57
/
.clang-tidy
122 lines (118 loc) · 3.96 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# All disabled checks have to come with an explanatory comment that states why they were disabled!
#
# modernize-use-trailing-return-type:
# Purely stylistic, makes function signature longer
#
# readability-identifier-length:
# Things like std::ostream os; nlohmann::json j; are popular. Reviewer can decide on those cases
#
# readability-implicit-bool-conversion:
# Makes packet-parsing (bool field that occupies a byte or bitfield) annoying
#
# hicpp-special-member-functions:
# Alias for cppcoreguidelines-special-member-functions, which is enabled. If both are enabled,
# the CheckOptions below have to be specified twice.
Checks: "
*,
-abseil-*,
-altera-*,
-android-*,
-darwin-*,
-fuchsia-*,
-linuxkernel-*,
-llvmlibc-*,
-mpi-*,
-objc-*,
-zircon-*,
-modernize-use-trailing-return-type,
-readability-identifier-length,
-readability-implicit-bool-conversion,
-hicpp-special-member-functions"
# WarningsAsErrors have been taken from:
# https://github.com/autowarefoundation/autoware/blob/3591106/.clang-tidy-ci
WarningsAsErrors: "
bugprone-dangling-handle,
bugprone-fold-init-type,
bugprone-inaccurate-erase,
bugprone-incorrect-roundings,
bugprone-misplaced-widening-cast,
bugprone-sizeof-container,
bugprone-sizeof-expression,
bugprone-string-constructor,
bugprone-suspicious-enum-usage,
bugprone-suspicious-memset-usage,
bugprone-suspicious-missing-comma,
bugprone-suspicious-semicolon,
bugprone-swapped-arguments,
bugprone-unchecked-optional-access,
bugprone-unused-raii,
bugprone-use-after-move,
bugprone-assert-side-effect,
bugprone-bad-signal-to-kill-thread,
bugprone-copy-constructor-init,
bugprone-dynamic-static-initializers,
bugprone-exception-escape,
bugprone-integer-division,
bugprone-macro-parentheses,
bugprone-macro-repeated-side-effects,
bugprone-misplaced-operator-in-strlen-in-alloc,
bugprone-move-forwarding-reference,
bugprone-multiple-statement-macro,
bugprone-not-null-terminated-result,
bugprone-parent-virtual-call,
bugprone-posix-return,
bugprone-signed-char-misuse,
bugprone-string-literal-with-embedded-nul,
bugprone-suspicious-string-compare,
bugprone-terminating-continue,
bugprone-throw-keyword-missing,
bugprone-too-small-loop-variable,
bugprone-undefined-memory-manipulation,
bugprone-undelegated-constructor,
bugprone-unhandled-self-assignment,
bugprone-unused-return-value,
bugprone-virtual-near-miss,
cppcoreguidelines-slicing,
cppcoreguidelines-special-member-functions,
cppcoreguidelines-pro-bounds-constant-array-index,
cppcoreguidelines-virtual-class-destructor,
cppcoreguidelines-init-variables,
cppcoreguidelines-narrowing-conversions,
google-build-explicit-make-pair,
google-build-namespaces,
google-explicit-constructor,
misc-non-copyable-objects,
misc-throw-by-value-catch-by-reference,
misc-definitions-in-headers,
misc-new-delete-overloads,
misc-redundant-expression,
misc-unconventional-assign-operator,
misc-uniqueptr-reset-release,
performance-inefficient-algorithm,
performance-move-const-arg,
performance-move-constructor-init,
performance-noexcept-move-constructor,
readability-simplify-boolean-expr"
HeaderFilterRegex: ^(?!\/usr)(?!\/opt)
FormatStyle: file
CheckOptions:
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.PrivateMemberSuffix
value: _
- key: readability-identifier-naming.StructCase
value: CamelCase
- key: readability-identifier-naming.FunctionCase
value: lower_case
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.GlobalConstantCase
value: lower_case
- key: readability-identifier-naming.GlobalConstantPrefix
value: g_
- key: readability-identifier-naming.ConstexprVariableCase
value: lower_case
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
value: true