p4c
p4c copied to clipboard
Add support for a clang-tidy linter to CMake. Add a files utility function to P4CUtils.cmake.
Add the ability to run clang-tidy across P4C files via CMake. This is not enabled yet for CI because clang-tidy is quite slow still.
However, one can still use it to run clang-tidy across one's files in bulk.
Supersedes #4253 if merged before it.
@vlstill This PR is ready. #4326 shows how it can be used. While we can not use clang-tidy at scale we can at least apply it in small increments. I would like to merge this PR before it starts to become too dated.
@asl This might help in applying clang-tidy in broader strokes. If you have any advice on how to improve the performance of the analyser please let me know.
@fruffy By "performance" you mean that it is currently slow?
Yes, clang-tidy requires many seconds to analyse a single file. This makes it a non-option for CI.