-
Notifications
You must be signed in to change notification settings - Fork 822
Expand file tree
/
Copy path.clang-tidy
More file actions
48 lines (42 loc) · 1.94 KB
/
.clang-tidy
File metadata and controls
48 lines (42 loc) · 1.94 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
Checks: [
"-*",
"bugprone-*",
"cert-*",
"clang-analyzer-*",
"concurrency-*",
"cppcoreguidelines-*",
"misc-*",
"modernize-*",
"performance-*",
"portability-*",
"readability-*",
"-bugprone-easily-swappable-parameters",
"-bugprone-narrowing-conversions",
"-cert-err58-cpp",
"-cppcoreguidelines-avoid-c-arrays",
"-cppcoreguidelines-avoid-magic-numbers",
"-cppcoreguidelines-avoid-non-const-global-variables",
"-cppcoreguidelines-non-private-member-variables-in-classes",
"-cppcoreguidelines-pro-bounds-array-to-pointer-decay",
"-cppcoreguidelines-pro-bounds-constant-array-index",
"-cppcoreguidelines-pro-bounds-pointer-arithmetic",
"-cppcoreguidelines-pro-type-const-cast",
"-cppcoreguidelines-pro-type-union-access",
"-cppcoreguidelines-pro-type-vararg",
"-misc-no-recursion",
"-misc-non-private-member-variables-in-classes"
]
WarningsAsErrors: '-*,bugprone-*,cert-*,clang-analyzer-*,concurrency-*,cppcoreguidelines-*,misc-*,portability-*,readability-implicit-bool-conversion,-concurrency-mt-unsafe,-readability-function-cognitive-complexity'
CheckOptions:
# ignore macros when computing the cyclomatic complexity. problem caused by RCLCPP LOG macros
- key: readability-function-cognitive-complexity.IgnoreMacros
value: 'true'
# This change makes it compatible with MISRA:2023 rule 4.14.1
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: 'true'
# Making a copy of a shared_ptr has a non-zero cost, but this cost is small.
# Unfortunately the ROS API (subscriber callbacks) oblige the user to use callbacks functions that will trigger this warning
# This is the reason wht the warning is silenced here
- key: performance-unnecessary-value-param.AllowedTypes
value: 'std::shared_ptr'
# Reference: https://clang.llvm.org/extra/clang-tidy/checks/readability/identifier-naming.html