xmake
xmake copied to clipboard
Clang tidy
Is your feature request related to a problem? Please describe.
It would be very helpful if xmake could run clang-tidy actions natively so we could get helpful information on any platform without having to generate vs projects or specific make files.
Describe the solution you'd like
xmake tidy
or an action in projects/makefiles to run clang-tidy.
Describe alternatives you've considered
Apart from making a custom makefile/vs project I don't see any option.
Additional context
https://devblogs.microsoft.com/cppblog/code-analysis-with-clang-tidy-in-visual-studio/
You can write an extension plugin and submit it to https://github.com/xmake-io/xmake-plugins, it does not need to be built into xmake.
We only need to execute the following commands to pull these extensions and use them.
xmake plugin --install
xmake clang-tidy
But I don't have time to implement this plugin. sorry.
It's already extremely convenient. We just need to export compile_commands and then simply run clang-tidy
xmake project -k compile_commands
run-clang-tidy
A simple bash script or a hook in xmake.lua would suffice.
It's already extremely convenient. We just need to export compile_commands and then simply run clang-tidy
xmake project -k compile_commands run-clang-tidy
A simple bash script or a hook in xmake.lua would suffice.
I am a new user of xmake. Recently, I want to use Clang-Tidy, but I found a problem, that is, Clang-Tidy will check the third-party library managed by xmake (xrepo), such as spdlog\fmt. How do you avoid this?
I have supported it. https://github.com/xmake-io/xmake/issues/3326