xref: /aosp_15_r20/external/pigweed/.clang-tidy (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1*61c4878aSAndroid Build Coastguard Worker# Copyright 2024 The Pigweed Authors
2*61c4878aSAndroid Build Coastguard Worker#
3*61c4878aSAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4*61c4878aSAndroid Build Coastguard Worker# use this file except in compliance with the License. You may obtain a copy of
5*61c4878aSAndroid Build Coastguard Worker# the License at
6*61c4878aSAndroid Build Coastguard Worker#
7*61c4878aSAndroid Build Coastguard Worker#     https://www.apache.org/licenses/LICENSE-2.0
8*61c4878aSAndroid Build Coastguard Worker#
9*61c4878aSAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software
10*61c4878aSAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11*61c4878aSAndroid Build Coastguard Worker# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12*61c4878aSAndroid Build Coastguard Worker# License for the specific language governing permissions and limitations under
13*61c4878aSAndroid Build Coastguard Worker# the License.
14*61c4878aSAndroid Build Coastguard Worker
15*61c4878aSAndroid Build Coastguard Worker---
16*61c4878aSAndroid Build Coastguard WorkerChecks: >
17*61c4878aSAndroid Build Coastguard Worker    bugprone-argument-comment,
18*61c4878aSAndroid Build Coastguard Worker    bugprone-assert-side-effect,
19*61c4878aSAndroid Build Coastguard Worker    bugprone-bool-pointer-implicit-conversion,
20*61c4878aSAndroid Build Coastguard Worker    bugprone-dangling-handle,
21*61c4878aSAndroid Build Coastguard Worker    bugprone-fold-init-type,
22*61c4878aSAndroid Build Coastguard Worker    bugprone-forward-declaration-namespace,
23*61c4878aSAndroid Build Coastguard Worker    bugprone-inaccurate-erase,
24*61c4878aSAndroid Build Coastguard Worker    bugprone-macro-repeated-side-effects,
25*61c4878aSAndroid Build Coastguard Worker    bugprone-move-forwarding-reference,
26*61c4878aSAndroid Build Coastguard Worker    bugprone-multiple-statement-macro,
27*61c4878aSAndroid Build Coastguard Worker    bugprone-string-constructor,
28*61c4878aSAndroid Build Coastguard Worker    bugprone-suspicious-memset-usage,
29*61c4878aSAndroid Build Coastguard Worker    bugprone-swapped-arguments,
30*61c4878aSAndroid Build Coastguard Worker    bugprone-undefined-memory-manipulation,
31*61c4878aSAndroid Build Coastguard Worker    bugprone-undelegated-constructor,
32*61c4878aSAndroid Build Coastguard Worker    bugprone-unused-raii,
33*61c4878aSAndroid Build Coastguard Worker    bugprone-use-after-move,
34*61c4878aSAndroid Build Coastguard Worker    clang-diagnostic-*,
35*61c4878aSAndroid Build Coastguard Worker    -clang-analyzer-*,
36*61c4878aSAndroid Build Coastguard Worker    darwin-avoid-spinlock,
37*61c4878aSAndroid Build Coastguard Worker    google-build-explicit-make-pair,
38*61c4878aSAndroid Build Coastguard Worker    google-build-namespaces,
39*61c4878aSAndroid Build Coastguard Worker    google-default-arguments,
40*61c4878aSAndroid Build Coastguard Worker    google-global-names-in-headers,
41*61c4878aSAndroid Build Coastguard Worker    google-readability-function-size,
42*61c4878aSAndroid Build Coastguard Worker    google-readability-namespace-comments,
43*61c4878aSAndroid Build Coastguard Worker    google-runtime-operator,
44*61c4878aSAndroid Build Coastguard Worker    misc-static-assert,
45*61c4878aSAndroid Build Coastguard Worker    misc-unconventional-assign-operator,
46*61c4878aSAndroid Build Coastguard Worker    misc-unused-using-decls,
47*61c4878aSAndroid Build Coastguard Worker    modernize-avoid-bind,
48*61c4878aSAndroid Build Coastguard Worker    modernize-deprecated-ios-base-aliases,
49*61c4878aSAndroid Build Coastguard Worker    modernize-make-shared,
50*61c4878aSAndroid Build Coastguard Worker    modernize-make-unique,
51*61c4878aSAndroid Build Coastguard Worker    modernize-replace-auto-ptr,
52*61c4878aSAndroid Build Coastguard Worker    modernize-replace-disallow-copy-and-assign-macro,
53*61c4878aSAndroid Build Coastguard Worker    modernize-replace-random-shuffle,
54*61c4878aSAndroid Build Coastguard Worker    modernize-shrink-to-fit,
55*61c4878aSAndroid Build Coastguard Worker    modernize-unary-static-assert,
56*61c4878aSAndroid Build Coastguard Worker    modernize-use-bool-literals,
57*61c4878aSAndroid Build Coastguard Worker    modernize-use-equals-delete,
58*61c4878aSAndroid Build Coastguard Worker    modernize-use-noexcept,
59*61c4878aSAndroid Build Coastguard Worker    modernize-use-nullptr,
60*61c4878aSAndroid Build Coastguard Worker    modernize-use-override,
61*61c4878aSAndroid Build Coastguard Worker    modernize-use-transparent-functors,
62*61c4878aSAndroid Build Coastguard Worker    modernize-use-uncaught-exceptions,
63*61c4878aSAndroid Build Coastguard Worker    performance-faster-string-find,
64*61c4878aSAndroid Build Coastguard Worker    performance-for-range-copy,
65*61c4878aSAndroid Build Coastguard Worker    performance-implicit-conversion-in-loop,
66*61c4878aSAndroid Build Coastguard Worker    performance-inefficient-algorithm,
67*61c4878aSAndroid Build Coastguard Worker    performance-inefficient-vector-operation,
68*61c4878aSAndroid Build Coastguard Worker    performance-move-constructor-init,
69*61c4878aSAndroid Build Coastguard Worker    readability-container-size-empty,
70*61c4878aSAndroid Build Coastguard Worker    readability-inconsistent-declaration-parameter-name,
71*61c4878aSAndroid Build Coastguard Worker    readability-misleading-indentation,
72*61c4878aSAndroid Build Coastguard Worker    readability-redundant-control-flow,
73*61c4878aSAndroid Build Coastguard Worker    readability-redundant-smartptr-get,
74*61c4878aSAndroid Build Coastguard Worker    readability-string-compare,
75*61c4878aSAndroid Build Coastguard WorkerWarningsAsErrors: >
76*61c4878aSAndroid Build Coastguard Worker    *,
77*61c4878aSAndroid Build Coastguard Worker    -clang-diagnostic-deprecated-declarations,
78*61c4878aSAndroid Build Coastguard Worker    -clang-diagnostic-unused-command-line-argument
79*61c4878aSAndroid Build Coastguard WorkerHeaderFilterRegex: '.*'
80*61c4878aSAndroid Build Coastguard Worker...
81*61c4878aSAndroid Build Coastguard Worker
82*61c4878aSAndroid Build Coastguard Worker# Disabled checks:
83*61c4878aSAndroid Build Coastguard Worker#
84*61c4878aSAndroid Build Coastguard Worker# clang-analyzer-*:
85*61c4878aSAndroid Build Coastguard Worker#
86*61c4878aSAndroid Build Coastguard Worker# performance-*
87*61c4878aSAndroid Build Coastguard Worker# bugprone-*
88*61c4878aSAndroid Build Coastguard Worker# cert-*
89*61c4878aSAndroid Build Coastguard Worker# misc-*
90*61c4878aSAndroid Build Coastguard Worker# readability-*
91*61c4878aSAndroid Build Coastguard Worker#
92*61c4878aSAndroid Build Coastguard Worker# Checks marked with @ should be reenabled first
93*61c4878aSAndroid Build Coastguard Worker# (the effort is minimal).
94*61c4878aSAndroid Build Coastguard Worker#
95*61c4878aSAndroid Build Coastguard Worker# modernize-avoid-c-arrays:
96*61c4878aSAndroid Build Coastguard Worker# @ modernize-concat-nested-namespaces:
97*61c4878aSAndroid Build Coastguard Worker#   Note: added in c++17
98*61c4878aSAndroid Build Coastguard Worker# modernize-deprecated-headers:
99*61c4878aSAndroid Build Coastguard Worker#   Advises to use <cheader> instead of <header.h> for
100*61c4878aSAndroid Build Coastguard Worker#   legacy headers
101*61c4878aSAndroid Build Coastguard Worker# modernize-loop-convert:
102*61c4878aSAndroid Build Coastguard Worker# @ modernize-pass-by-value:
103*61c4878aSAndroid Build Coastguard Worker# @ modernize-raw-string-literal:
104*61c4878aSAndroid Build Coastguard Worker#   Note: added in c++11
105*61c4878aSAndroid Build Coastguard Worker# @ modernize-redundant-void-arg:
106*61c4878aSAndroid Build Coastguard Worker# modernize-return-braced-init-list:
107*61c4878aSAndroid Build Coastguard Worker# @ modernize-use-auto:
108*61c4878aSAndroid Build Coastguard Worker#   Advises to use auto when initializing with a cast to
109*61c4878aSAndroid Build Coastguard Worker#   avoid duplicating the type name
110*61c4878aSAndroid Build Coastguard Worker# modernize-use-default-member-init:
111*61c4878aSAndroid Build Coastguard Worker#   Note: added in c++11
112*61c4878aSAndroid Build Coastguard Worker#   Advises to use a default initializer in
113*61c4878aSAndroid Build Coastguard Worker#   member declarations
114*61c4878aSAndroid Build Coastguard Worker# @ modernize-use-emplace:
115*61c4878aSAndroid Build Coastguard Worker# @ modernize-use-equals-default:
116*61c4878aSAndroid Build Coastguard Worker#   Note: added in c++11
117*61c4878aSAndroid Build Coastguard Worker#   Advises to use '= default' for empty constructors or
118*61c4878aSAndroid Build Coastguard Worker#   destructors '{}'
119*61c4878aSAndroid Build Coastguard Worker# modernize-use-nodiscard:
120*61c4878aSAndroid Build Coastguard Worker#   Note: added in c++17
121*61c4878aSAndroid Build Coastguard Worker# @ modernize-use-override:
122*61c4878aSAndroid Build Coastguard Worker# modernize-use-trailing-return-type:
123*61c4878aSAndroid Build Coastguard Worker#   Note: added in c++11
124*61c4878aSAndroid Build Coastguard Worker#   Used to delay the writing of the return type
125*61c4878aSAndroid Build Coastguard Worker#   to after the function parameters; does not make
126*61c4878aSAndroid Build Coastguard Worker#   sense to generalise its use.
127*61c4878aSAndroid Build Coastguard Worker# modernize-use-using:
128*61c4878aSAndroid Build Coastguard Worker#   Note: added in c++11
129*61c4878aSAndroid Build Coastguard Worker#   Advises to use 'using' instead of 'typedef'
130