You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Development: add a script that caches clang-tidy results. (openscad#5304)
A self-contained c++ program that runs clang-tidy in parallel
on all files that changed since last invocation. It also takes
changed headers into acccount and re-processes all files that
depend on these.
Fully self-contaiend, so it can be invoked as a 'script' as
it compiles itself; a simple
scripts/run-clang-tidy-cached.cc
works (but also invoking with 'sh -c' if you wish).
The results are cached in ~/.cache/clang-tidy out of tree, so
different checkouts or switching between branches
will also only need to process the different files.
The output are two files
* OpenSCAD_clang-tidy.out : contains the detailed 'compiler warning'-like
output (I usually use `cat OpenSCAD_clang-tidy.out` as 'compile command'
in my editor to be able to step through it.
* OpenSCAD_clang-tidy.summary : A summary with all finding counts, grouped
by type (see openscad#5300 for an example).
A copy from run-clang-tidy-cached.cc from https://github.com/hzeller/dev-tools
with configuration for openscad; so the only difference from that upstream
script is the config-section:
```c++
static constexpr ConfigValues kConfig = {
.cache_prefix = "OpenSCAD_",
.start_dir = "src/",
.file_exclude_re = "src/ext/",
.revisit_brokenfiles_if_build_config_newer = false, // not clean yet.
};
```
Fixesopenscad#5300
0 commit comments