Skip to content

Instantly share code, notes, and snippets.

@objectx
Created May 8, 2017 18:29
Show Gist options
  • Save objectx/f8b822f5ce44aa64fd7a1cddcbe53d03 to your computer and use it in GitHub Desktop.
Save objectx/f8b822f5ce44aa64fd7a1cddcbe53d03 to your computer and use it in GitHub Desktop.
Place this on the project root and run `clang-tidy -p <BUILD_DIR> -header-filter='.*' <source file>`
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,modernize-*,performance-*,readability-*'
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: true
CheckOptions:
- 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'
...
@objectx
Copy link
Author

objectx commented May 8, 2017

Prerequisite: Run CMake with -DCMAKE_EXPORT_COMPILE_COMMANDS=YES

i.e. cd BUILD && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=YES ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment