nng
nng copied to clipboard
Add support for Clang-Tidy
This PR adds support for Clang-Tidy by simply passing -DCLANG_TIDY=ON
when configuring CMake.
If you want to let Clang-Tidy try to fix the suggestions, warnings and errors Automagically™ just pass -DCLANG_TIDY_FIX=ON
.
Build as usual using cmake --build .
(or ninja
, make
etc)
I took the liberty to choose the clang-tidy checks at my own liking. Should any of them not be suitable for this project, please comment.
Tested on Linux, OSX and Windows.
Note that the above format should be used in your git commit comments. You agree that by submitting a PR, you have read and agreed to our contributing guidelines.
I'll have a go at this -- I want to test it out for myself before I merge.
Mostly this is on hold waiting for me to review and assess. I'm using a clang-tidy integration with my editor now, which is helping, along with checks being done via LGTM during the PR process.
I've not forgotten about this PR -- it's not a huge priority for me however. I will probably work towards getting something based on this work in later -- I really want to clean up the mess that is our CMake support first though.