Skip to content

Instantly share code, notes, and snippets.

@program--
Last active August 20, 2023 00:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save program--/0e1a8d594994b1c6d9d9e3105ef814c6 to your computer and use it in GitHub Desktop.
Save program--/0e1a8d594994b1c6d9d9e3105ef814c6 to your computer and use it in GitHub Desktop.
Clang Format
---
Language: Cpp
BasedOnStyle: Mozilla
UseTab: Never
IndentWidth: 4
ColumnLimit: 80
DerivePointerAlignment: false
PointerAlignment: Left
AlignAfterOpenBracket: BlockIndent
AlignConsecutiveMacros: AcrossEmptyLines
AlignConsecutiveAssignments: AcrossEmptyLines
AlignConsecutiveBitFields: AcrossEmptyLines
AlignConsecutiveDeclarations: AcrossEmptyLines
AlignEscapedNewlines: Left
AlignTrailingComments: true
AlwaysBreakTemplateDeclarations: Yes
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
SortUsingDeclarations: true
SortIncludes: Never
FixNamespaceComments: true
BraceWrapping:
AfterExternBlock: false
AfterClass: true
AfterControlStatement: Never
AfterEnum: true
AfterNamespace: false
AfterFunction: true
AfterStruct: true
AfterUnion: true
AfterObjCDeclaration: true
BeforeCatch: false
BeforeElse: false
BeforeWhile: false
BeforeLambdaBody: false
IndentBraces: false
AfterCaseLabel: false
SplitEmptyFunction: false
SplitEmptyNamespace: false
SplitEmptyRecord: false
BreakBeforeBraces: Custom
IndentExternBlock: NoIndent
---
---
Checks: >
clang-diagnostic-*,
clang-analyzer-*,
cppcoreguidelines-*,
bugprone-*,
performance-*,
portability-*,
readability-*,
hicpp-*,
modernize-*,
-modernize-use-trailing-return-type,
-modernize-concat-nested-namespaces,
-readability-identifier-length,
-cppcoreguidelines-avoid-non-const-global-variables
WarningsAsErrors: true
HeaderFilterRegex: ""
AnalyzeTemporaryDtors: false
FormatStyle: file
CheckOptions:
- key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
value: "1"
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: "1"
- key: cppcoreguidelines-avoid-do-while.IgnoreMacros
value: true
- key: modernize-loop-convert.MaxCopySize
value: "16"
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: modernize-loop-convert.NamingStyle
value: CamelCase
- key: modernize-use-nullptr.NullMacros
value: "NULL"
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment