copy paste .clang-tidy from a modern-cpp-template#186
copy paste .clang-tidy from a modern-cpp-template#186Arniiiii wants to merge 1 commit intoTheLartians:masterfrom
Conversation
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.
TheLartians
left a comment
There was a problem hiding this comment.
Thanks for the great config example! I'm not quite sure about its inclusion in the starter yet as I want to avoid too unused configs in derived projects, especially if the checks are not enforced in CI. Unfortunately I don't have much experience with clang-tidy myself, but do you think it would make sense to enforce it as a CI rule?
|
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 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 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. |
|
|
| CheckOptions: [{ key: misc-non-private-member-variables-in-classes, value: IgnoreClassesWithAllMemberVariablesBeingPublic }] | ||
| WarningsAsErrors: '' | ||
| HeaderFilterRegex: '' | ||
| FormatStyle: none |
Yes, but you should use
|
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.