Skip to content

Instantly share code, notes, and snippets.

@avin
Last active October 23, 2021 18:41
Show Gist options
  • Save avin/b326f0f449dc026a06735d619c3cfa48 to your computer and use it in GitHub Desktop.
Save avin/b326f0f449dc026a06735d619c3cfa48 to your computer and use it in GitHub Desktop.
C++ clang-tidy + clang-format
BasedOnStyle: LLVM
Standard: c++17
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
DerivePointerAlignment: true
PointerAlignment: Left
IndentWidth: 4
ContinuationIndentWidth: 8
---
Checks: |
-*,
clang-*,
-clang-diagnostic-unused-command-line-argument,
readability-*,
-readability-magic-numbers,
cppcoreguidelines-*,
-cppcoreguidelines-avoid-magic-numbers,
misc-*,
-misc-noexcept*,
performance-*,
modernize-*,
-modernize-use-equals-delete,
-modernize-use-trailing-return-type,
CheckOptions:
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.StructCase
value: CamelCase
- key: readability-identifier-naming.TypedefCase
value: CamelCase
- key: readability-identifier-naming.TypeAliasCase
value: CamelCase
- key: readability-identifier-naming.FunctionCase
value: lower_case
- key: readability-identifier-naming.ParameterCase
value: lower_case
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.PrivateMemberCase
value: lower_case
- key: readability-identifier-naming.PrivateMemberSuffix
value: '_'
- key: readability-identifier-naming.GlobalConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.StaticConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.ConstexprVariableCase
value: UPPER_CASE
- key: readability-identifier-naming.TypeTemplateParameterCase
value: CamelCase
- key: readability-simplify-boolean-expr.ChainedConditionalReturn
value: '1'
- key: readability-simplify-boolean-expr.ChainedConditionalAssignment
value: '1'
- key: modernize-use-trailing-return-type
value: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment