ModernCppStarter
ModernCppStarter copied to clipboard
copy paste .clang-tidy from a modern-cpp-template
It's a really good default. It's copy-paste from https://github.com/filipdutescu/modern-cpp-template with one modification: turn off warnings as error for clang-tidy.
Thanks for the answer and for your efforts to make the starter better!
I think using clang-tidy as warning tool or warning-as-error tool is amazing actually.
I prefer use it as warning-generating tool to find out more problems with code from c++ point of view.
During my use of clang-tidy I found out that with the config the only stuff that makes it warning-as-error is declaring function with an unused parameter and the parameter should be not commented to get warning-as-error behaviour. I genuinely don't know how to disable it, though, I guess it's an OK warning-as-error.
Because of the points above, I guess it would be good to have a github workflow that passes through clang-tidy a codebase to show the error, generate a lot of warnings ( even performance related ) or , if user of the starter changes the .clang-tidy
to make a warning into warning-as-error , to generate error.
However, I'm not so proficient with github workflows. I would be pleased If someone can do that or help with it.
Thanks for the explanations! Unfortunately I'm currently too busy to help out, but would be happy to include this if we can manage to add a linter step to the workflows!
Seems like you do have clang-format
but also don't check it automatically on the gh actions. For clang-tidy seems like here you already have a way to run clang-tidy.
Do you want someone to create a specific step on the actions? There are a few options for that on the marketplace, I can try to test one or two if you prefer.
clang-format
is actually run here, in the style
workflow. Currently it's separate from the general tests workflows so it shows up as a unique action on the PR workflows page. Could it make sense to change it into a style and lint
workflow?