Update clang-tidy to include some more recent rules.. #4003
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Also add the run-clang-tidy-cached.cc script (which is in c++ for ease of maintenance) which allows to cache the output, so reprocessing files is much faster.
The cache script can be found on https://github.com/hzeller/dev-tools and is essentially just a non-modified drop-in here (except the configuration in line 118 that says to start searching in
src/
)I've not removed the old
run-clang-tidy.sh
script, as it has the functionality to run with a"limited"
set of rules.While at it , update the
.clang-tidy
rules to include some more wildcards, but also remove an old option that does not work anymore with current clang-tidy.Due to the caching, only changed files will be re-processed, and if there are no changes, the output is essentially instant. When it processes files, it uses all cores on the machine.
The script is written in C++, but it self-compiles, so with the executable bit flag set, it can be invoked directly like this:
(alternatively , it can be invoked with a shell like so:
sh .github/bin/run-clang-tidy-cached.cc
)