-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy path.clang-tidy
More file actions
152 lines (151 loc) · 5.92 KB
/
.clang-tidy
File metadata and controls
152 lines (151 loc) · 5.92 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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
---
Checks: "-*,\
boost-*,\
-boost-use-ranges,\
bugprone-*,\
-bugprone-argument-comment,\
-bugprone-assignment-in-if-condition,\
-bugprone-branch-clone,\
-bugprone-crtp-constructor-accessibility,\
-bugprone-easily-swappable-parameters,\
-bugprone-empty-catch,\
-bugprone-fold-init-type,\
-bugprone-implicit-widening-of-multiplication-result,\
-bugprone-incorrect-roundings,\
-bugprone-infinite-loop,\
-bugprone-integer-division,\
-bugprone-macro-parentheses,\
-bugprone-misplaced-widening-cast,\
-bugprone-narrowing-conversions,\
-bugprone-not-null-terminated-result,\
-bugprone-pointer-arithmetic-on-polymorphic-object,\
-bugprone-reserved-identifier,\
-bugprone-signed-char-misuse,\
-bugprone-sizeof-expression,\
-bugprone-suspicious-realloc-usage,\
-bugprone-switch-missing-default-case,\
-bugprone-unhandled-self-assignment,\
clang-analyzer-*,\
-clang-analyzer-core.CallAndMessage,\
-clang-analyzer-core.DivideZero,\
-clang-analyzer-core.NonNullParamChecker,\
-clang-analyzer-core.NullDereference,\
-clang-analyzer-core.UndefinedBinaryOperatorResult,\
-clang-analyzer-core.VLASize,\
-clang-analyzer-core.uninitialized.ArraySubscript,\
-clang-analyzer-core.uninitialized.Assign,\
-clang-analyzer-core.uninitialized.Branch,\
-clang-analyzer-cplusplus.Move,\
-clang-analyzer-cplusplus.NewDelete,\
-clang-analyzer-cplusplus.NewDeleteLeaks,\
-clang-analyzer-cplusplus.PlacementNew,\
-clang-analyzer-deadcode.DeadStores,\
-clang-analyzer-optin.cplusplus.UninitializedObject,\
-clang-analyzer-optin.cplusplus.VirtualCall,\
-clang-analyzer-optin.core.EnumCastOutOfRange,\
-clang-analyzer-optin.mpi.MPI-Checker,\
-clang-analyzer-optin.performance.Padding,\
-clang-analyzer-optin.portability.UnixAPI,\
-clang-analyzer-security.FloatLoopCounter,\
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,\
-clang-analyzer-security.insecureAPI.strcpy,\
-clang-analyzer-unix.Malloc,\
-clang-analyzer-unix.MallocSizeof,\
-clang-analyzer-unix.MismatchedDeallocator,\
-clang-analyzer-valist.Unterminated,\
misc-*,\
-misc-const-correctness,\
-misc-confusable-identifiers,\
-misc-header-include-cycle,\
-misc-include-cleaner,\
-misc-no-recursion,\
-misc-non-private-member-variables-in-classes,\
-misc-redundant-expression,\
-misc-throw-by-value-catch-by-reference,\
-misc-unconventional-assign-operator,\
-misc-use-anonymous-namespace,\
-misc-use-internal-linkage,\
-misc-unused-parameters,\
-misc-unused-using-decls,\
modernize-*,\
-modernize-avoid-c-arrays,\
-modernize-concat-nested-namespaces,\
-modernize-deprecated-headers,\
-modernize-loop-convert,\
-modernize-macro-to-enum,\
-modernize-make-unique,\
-modernize-pass-by-value,\
-modernize-raw-string-literal,\
-modernize-replace-random-shuffle,\
-modernize-return-braced-init-list,\
-modernize-type-traits,\
-modernize-use-auto,\
-modernize-use-default-member-init,\
-modernize-use-equals-delete,\
-modernize-use-nodiscard,\
-modernize-use-trailing-return-type,\
-modernize-use-using,\
mpi-*,\
openmp-*,\
performance-*,\
-performance-avoid-endl,\
-performance-enum-size,\
-performance-inefficient-string-concatenation,\
-performance-no-int-to-ptr,\
-performance-type-promotion-in-math-fn,\
-performance-unnecessary-value-param,\
portability-*,\
-portability-template-virtual-member-function,\
readability-*,\
-readability-avoid-unconditional-preprocessor-if,\
-readability-braces-around-statements,\
-readability-container-contains,\
-readability-convert-member-functions-to-static,\
-readability-else-after-return,\
-readability-identifier-length,\
-readability-function-cognitive-complexity,\
-readability-function-size,\
-readability-implicit-bool-conversion,\
-readability-inconsistent-declaration-parameter-name,\
-readability-isolate-declaration,\
-readability-magic-numbers,\
-readability-make-member-function-const,\
-readability-math-missing-parentheses,\
-readability-named-parameter,\
-readability-non-const-parameter,\
-readability-qualified-auto,\
-readability-redundant-declaration,\
-readability-redundant-preprocessor,\
-readability-simplify-boolean-expr,\
-readability-static-accessed-through-instance,\
-readability-suspicious-call-argument,\
-readability-uppercase-literal-suffix,\
-readability-use-anyofallof,\
"
CheckOptions:
- key: bugprone-unsafe-functions.ReportDefaultFunctions
value: false
- key: bugprone-unsafe-functions.ReportMoreUnsafeFunctions
value: true
- key: bugprone-unsafe-functions.CustomFunctions
value: |
^(atof|atoi|atol|atoll)$,vtk::from_chars or vtk::scan_int or vtk::scan_value,is unsafe and slow;
^(stof|stod|stold|stoi|stol|stoll|stoul|stoull)$,vtk::from_chars or vtk::scan_int or vtk::scan_value,is slow;
^(strtof|strtod|strtold|strtol|strtoll|_strtoi64|strtoul|strtoull)$,vtk::from_chars or vtk::scan_int or vtk::scan_value,is unsafe and slow;
^(sscanf|sscanf_s|vsscanf|vsscanf_s)$,vtk::scan or vtk::scan_int or vtk::scan_value,is unsafe and slow;
^(strptime)$,vtk::scan,is unsafe and slow;
^(std::from_chars)$,vtk::from_chars,is slow;
^(std::get_time)$,vtk::scan,is slow;
^(scanf|scanf_s|vscanf|vscanf_s)$,vtk::input or vtk::scan or vtk::scan_value,is unsafe and slow;
^(fscanf|fscanf_s|vfscanf|vfscanf_s)$,vtk::scan or vtk::scan_value,is unsafe and slow;
^(itoa|_itoa|ltoa|_ltoa|lltoa|_i64toa|ultoa|_ultoa|ulltoa|_ulltoa|_ui64toa)$,vtk::to_string or vtk::to_chars,is unsafe and slow;
^(sprintf|sprintf_s|vsprintf|vsprintf_s|strftime)$,vtk::format or vtk::format_to,is unsafe and slow;
^(snprintf|snprintf_s|vsnprintf|vsnprintf_s)$,vtk::format_to_n,is unsafe and slow;
^(std::to_chars)$,vtk::to_chars,is slow;
^(std::to_string)$,vtk::to_string,is slow;
^(std::put_time)$,vtk::format,is slow;
^(printf|printf_s|vprintf|vprintf_s)$,vtk::print or vtk::println,is unsafe and slow;
^(fprintf|fprintf_s|vfprintf|vfprintf_s)$,vtk::print or vtk::println,is unsafe and slow;
^(vtkAbstractArray::GetVoidPointer|vtkDataArray::GetVoidPointer)$,GetPointer or vtkArrayDispatch, is unsafe and duplicates memory;
#WarningsAsErrors: "*"
...