@@ -119,6 +119,101 @@ If you are not building with clang, the `clang-tidy` target will do nothing.
119119NOTE: As with `clang-format`, for preference, we'll find the `clang-tidy` that
120120exists alongside the compiler being used.
121121
122+ === Enabled clang-tidy checks
123+
124+ The following https://clang.llvm.org/extra/clang-tidy/checks/list.html[`clang-tidy` check] categories are enabled:
125+
126+ * bugprone-*
127+ * clang-diagnostic-*
128+ * clang-analyzer-*
129+ * cppcoreguidelines-*
130+ * misc-*
131+ * modernize-*
132+ * performance-*
133+ * portability-*
134+ * readability-*
135+
136+ In addition, the following specific checks are enabled:
137+
138+ * https://clang.llvm.org/extra/clang-tidy/checks/boost/use-to-string.html[boost-use-to-string]
139+ * https://clang.llvm.org/extra/clang-tidy/checks/google/build-explicit-make-pair.html[google-build-explicit-make-pair]
140+ * https://clang.llvm.org/extra/clang-tidy/checks/google/build-namespaces.html[google-build-namespaces]
141+ * https://clang.llvm.org/extra/clang-tidy/checks/google/default-arguments.html[google-default-arguments]
142+ * https://clang.llvm.org/extra/clang-tidy/checks/google/explicit-constructor.html[google-explicit-constructor]
143+ * https://clang.llvm.org/extra/clang-tidy/checks/google/readability-casting.html[google-readability-casting]
144+ * https://clang.llvm.org/extra/clang-tidy/checks/google/runtime-int.html[google-runtime-int]
145+ * https://clang.llvm.org/extra/clang-tidy/checks/hicpp/signed-bitwise.html[hicpp-signed-bitwise]
146+
147+ The following specific checks are _disabled_ because they are aliases for other
148+ checks, and clang-tidy does not deduplicate them:
149+
150+ * https://clang.llvm.org/extra/clang-tidy/checks/bugprone/narrowing-conversions.html[bugprone-narrowing-conversions]
151+ aliases
152+ https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/narrowing-conversions.html[cpp-coreguidelines-narrowing-conversions]
153+ * https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/avoid-c-arrays.html[cppcoreguidelines-avoid-c-arrays]
154+ aliases
155+ https://clang.llvm.org/extra/clang-tidy/checks/modernize/avoid-c-arrays.html[modernize-avoid-c-arrays]
156+ * https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/avoid-magic-numbers.html[cppcoreguidelines-avoid-magic-numbers]
157+ aliases
158+ https://clang.llvm.org/extra/clang-tidy/checks/readability/magic-numbers.html[readability-magic-numbers]
159+ * https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/c-copy-assignment-signature.html[cppcoreguidelines-c-copy-assignment-signature]
160+ aliases
161+ https://clang.llvm.org/extra/clang-tidy/checks/misc/unconventional-assign-operator.html[misc-unconventional-assignment-operator]
162+ * https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/explicit-virtual-functions.html[cppcoreguidelines-explicit-virtual-functions]
163+ aliases
164+ https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-override.html[modernize-use-override]
165+ * https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/macro-to-enum.html[cppcoreguidelines-macro-to-enum]
166+ aliases
167+ https://clang.llvm.org/extra/clang-tidy/checks/modernize/macro-to-enum.html[modernize-macro-to-enum]
168+ * https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/noexcept-destructor.html[cppcoreguidelines-noexcept-destructor]
169+ aliases
170+ https://clang.llvm.org/extra/clang-tidy/checks/performance/noexcept-destructor.html[performance-noexcept-destructor]
171+ * https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/noexcept-move-operations.html[cppcoreguidelines-noexcept-move-operations]
172+ aliases
173+ https://clang.llvm.org/extra/clang-tidy/checks/performance/noexcept-move-constructor.html[performance-noexcept-move-constructor]
174+ * https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/noexcept-swap.html[cppcoreguidelines-noexcept-swap]
175+ aliases
176+ https://clang.llvm.org/extra/clang-tidy/checks/performance/noexcept-swap.html[performance-noexcept-swap]
177+ * https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/non-private-member-variables-in-classes.html[cppcoreguidelines-non-private-member-variables-in-classes]
178+ aliases
179+ https://clang.llvm.org/extra/clang-tidy/checks/misc/non-private-member-variables-in-classes.html[misc-non-private-member-variables-in-classes]
180+ * https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/use-default-member-init.html[cppcoreguidelines-use-default-member-init]
181+ aliases
182+ https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-default-member-init.html[modernize-use-default-member-init]
183+
184+ The following checks are disabled for specific reasons:
185+
186+ * https://clang.llvm.org/extra/clang-tidy/checks/bugprone/easily-swappable-parameters.html[bugprone-easily-swappable-parameters] -
187+ may be enabled someday, but currently too onerous.
188+ * https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/avoid-non-const-global-variables.html[cppcoreguidelines-avoid-non-const-global-variables] -
189+ the nature of embedded work makes this check ill-conceived.
190+ * https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/missing-std-forward.html[cppcoreguidelines-missing-std-forward] -
191+ this check misdiagnoses some common things.
192+ * https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/pro-bounds-pointer-arithmetic.html[cppcoreguidelines-pro-bounds-pointer-arithmetic] -
193+ may be enabled someday, but currently too onerous.
194+ * https://clang.llvm.org/extra/clang-tidy/checks/misc/include-cleaner.html[misc-include-cleaner] -
195+ warns on omnibus headers.
196+ * https://clang.llvm.org/extra/clang-tidy/checks/misc/non-private-member-variables-in-classes.html[misc-non-private-member-variables-in-classes] -
197+ public variables don't contribute to class invariants.
198+ * https://clang.llvm.org/extra/clang-tidy/checks/modernize/concat-nested-namespaces.html[modernize-concat-nested-namespaces] -
199+ it's a style choice.
200+ * https://clang.llvm.org/extra/clang-tidy/checks/readability/identifier-length.html[readability-identifier-length] -
201+ one of the most expensive checks; not worth the cost.
202+ * https://clang.llvm.org/extra/clang-tidy/checks/readability/identifier-naming.html[readability-identifier-naming] -
203+ one of the most expensive checks; not worth the cost.
204+ * https://clang.llvm.org/extra/clang-tidy/checks/readability/magic-numbers.html[readability-magic-numbers] -
205+ the nature of embedded work makes this too onerous.
206+ * https://clang.llvm.org/extra/clang-tidy/checks/readability/named-parameter.html[readability-named-parameter] -
207+ it's a style choice.
208+ * https://clang.llvm.org/extra/clang-tidy/checks/readability/qualified-auto.html[readability-qualified-auto] -
209+ it's a style choice.
210+ * https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-inline-specifier.html[readability-redundant-inline-specifier] -
211+ `inline` is mostly, but not _only_ for the linker.
212+ * https://clang.llvm.org/extra/clang-tidy/checks/readability/uppercase-literal-suffix.html[readability-uppercase-literal-suffix] -
213+ it's a style choice.
214+
215+ It is likely in the future that more clang-tidy checks will be enabled.
216+
122217=== `mypy`
123218
124219Python linting is available using https://mypy-lang.org/[`mypy`]. To lint python
0 commit comments