Last active
February 13, 2024 09:31
-
-
Save fbaeuerlein/2895f889e451a817d7b2b36fd60e2873 to your computer and use it in GitHub Desktop.
A general clang-tidy configuration file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
Checks: 'clang-diagnostic-*,clang-analyzer-*,cppcoreguidelines-*,modernize-*,-modernize-use-trailing-return-type' | |
WarningsAsErrors: true | |
HeaderFilterRegex: '' | |
AnalyzeTemporaryDtors: false | |
FormatStyle: google | |
CheckOptions: | |
- key: cert-dcl16-c.NewSuffixes | |
value: 'L;LL;LU;LLU' | |
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField | |
value: '0' | |
- key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors | |
value: '1' | |
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic | |
value: '1' | |
- key: google-readability-braces-around-statements.ShortStatementLines | |
value: '1' | |
- key: google-readability-function-size.StatementThreshold | |
value: '800' | |
- key: google-readability-namespace-comments.ShortNamespaceLines | |
value: '10' | |
- key: google-readability-namespace-comments.SpacesBeforeComments | |
value: '2' | |
- key: modernize-loop-convert.MaxCopySize | |
value: '16' | |
- key: modernize-loop-convert.MinConfidence | |
value: reasonable | |
- key: modernize-loop-convert.NamingStyle | |
value: CamelCase | |
- key: modernize-pass-by-value.IncludeStyle | |
value: llvm | |
- key: modernize-replace-auto-ptr.IncludeStyle | |
value: llvm | |
- key: modernize-use-nullptr.NullMacros | |
value: 'NULL' | |
... | |
Even I need to integrate the config file using cmake.
I tried the same way using the -config flag but no luck
@DavidKroeter84 @fbaeuerlein
You can try with -config-file=<path>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @fbaeuerlein!
How would one integrate the config file using cmake? I have tried the following:
Apparently the config file is read, but the content does not seem to meet the format expectations:
Thanks for helping out! ;-)