Commit Graph

8 Commits

Author SHA1 Message Date
Andrew Kaster
e6762e8d4d Meta: Disable readability-function-cognitive-complexity in clang-tidy
Feedback from contributors suggests that this warning doesn't help code
quality, and is seen as noisy.
2024-02-05 08:04:24 -07:00
Andrew Kaster
3078572f0d Meta: Disable misc-include-cleaner in clang-tidy
IncludeCleaner is a new feature of clang-tidy/clangd that adds upstream
support for the include-what-you-use (IWYU) tool's checks.

However, this tool is very noisy on our codebase. It can be enabled by
individual contributors at their leisure.
2024-02-05 08:04:24 -07:00
Hendiadyoin1
239293a8b4 Meta: Disable misc-use-anonymous-namespace clang-tidy warning
This flags nearly every static function, so let's disable it
2023-08-23 12:25:40 +01:00
Andreas Kling
7d6bab2256 Meta: Disable the misc-no-recursion check in clang-tidy
We use recursive algorithms all over the place, and this check makes
it hard to read those algorithms in CLion, since it draws squiggles
under everything.
2023-03-18 16:34:41 +01:00
Hendiadyoin1
2b206b1854 Meta: Disable readability-use-anyofallof clang-tidy check 2022-01-09 23:29:57 -08:00
Idan Horowitz
4dbda2d5b4 Meta: Enable the "bugprone-dangling-handle" clang-tidy check
This should catch (the trivial cases of) construction of StringViews
from temporary Strings and the construction of Spans from temporary
Vectors.
2021-12-10 23:00:24 +02:00
Andreas Kling
2482966db9 Meta: Disable "readability-identifier-length" clang-tidy checks
Short identifier names like "i", "x", "fd" are fairly common and fine.
2021-11-21 20:22:48 +01:00
Andrew Kaster
3eeca784d2 Meta: Add basic clang-tidy configuration
Add a basic clang-tidy configuration that enables checks from the
following categories:

- bugprone
- cert
- clang-analyzer
- concurrency
- misc
- performance
- portability
- readability

The noisiest rules that have conflicts with the project style guide or
accepted practices have been turned off.

There's absolutely more work to be done here before we could consider
setting any of these warnings as errors and enforcing them in CI, but
committing a project clang-tidy configuration should help the rules
become more visible and let other contributors take a crack at tweaking
rules and/or finding possible bugs.

Sadly the cpp-core-guidelines and modernize categories are very, very
noisy. If we want to enable rules from these categories, they would need
to be on a rule by rule basis.
2021-11-14 22:52:35 +01:00