filipdutescu / modern-cpp-template

A template for modern C++ projects using CMake, Clang-Format, CI, unit testing and more, with support for downstream inclusion.
The Unlicense
1.69k stars 214 forks source link

[FEATURE] Add a little more eloborations on which clang-tidy checks going to used. #18

Closed ghost closed 4 years ago

ghost commented 4 years ago

clang-tidy has set of checks and putted under the some flags. I think it's better to be explicit about which checks are available. I think it's better to list them in the corresponding CMake module of the template, StaticAnalyzers.cmake.

I make a commit, which available in here: https://github.com/p1v0t/modern-cpp-template/commit/f64f3d3ec76078f8200ac5c794c5e80661a71da3

I can pull it, if you people are see whether its useful or not.

filipdutescu commented 4 years ago

This sounds like a really good idea. Will look a bit more into the checks and flags provided by clang-tidy and I will try to find a proper way to make it a bit more obvious what checks are available. Thanks for the commit as well, it was very nice to include an example of what you wish for.

filipdutescu commented 4 years ago

On a second look, I will not implement your desired changes, as those options should be defined in the .clang-tidy file, rather then in CMake (at least in my vision). If you feel like it makes more sense to have them defined in CMake, please let me know why, so we can discuss your reasoning.