p4c icon indicating copy to clipboard operation
p4c copied to clipboard

Add support for a clang-tidy linter to CMake. Add a files utility function to P4CUtils.cmake.

Open fruffy opened this issue 1 year ago • 4 comments

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.

fruffy avatar Nov 17 '23 23:11 fruffy

@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.

fruffy avatar Jan 29 '24 16:01 fruffy

@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 avatar Mar 08 '24 22:03 fruffy

@fruffy By "performance" you mean that it is currently slow?

asl avatar Mar 14 '24 02:03 asl

Yes, clang-tidy requires many seconds to analyse a single file. This makes it a non-option for CI.

fruffy avatar Mar 14 '24 13:03 fruffy