Skip to content

Improve the clang-format and clang-tidy integration

  1. Update util/run-clang-tidy.py to clang-tidy-18 version

    The util/run-clang-tidy.py contains extra code that fixes up the file paths, so run-clang-tidy actually works. The problem is that the run-clang-tidy expects to work from a "base" directory and strips directory from the compilation database. Our copy of run-clang-tidy.py contains a little path fixer.

    Our custom version also doesn't try to apply fixes if the clang-tidy invocation failed with an error.

  2. Add util/run-clang-tidy.sh script that can be used to run clang-tidy on the compilation database. The compilation database can be created by running:

    pip3 install compiledb autoreconf -fi ./configure --enable-developer compiledb make -j

Closes #2933 (closed)

Merge request reports