mirror of
https://github.com/thepigeongenerator/sdl_template.git
synced 2025-12-17 05:55:47 +01:00
modify project clang-format to the correct project formatting options
This commit is contained in:
184
.clang-format
184
.clang-format
@@ -2,14 +2,14 @@
|
|||||||
# ---------------------------
|
# ---------------------------
|
||||||
# general style settings
|
# general style settings
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
BasedOnStyle: '' # (LLVM,Google,Chromium,Mozilla,WebKit,Microsoft,GNU,InheritParentConfig)
|
BasedOnStyle: '' # (LLVM,Google,Chromium,Mozilla,WebKit,Microsoft,GNU,InheritParentConfig)
|
||||||
Standard: Auto # automatically detect the language version
|
Standard: Auto # automatically detect the language version
|
||||||
ColumnLimit: 0 # 0: disable column limit
|
ColumnLimit: 0 # 0: disable column limit
|
||||||
LineEnding: LF # use LF line endings
|
LineEnding: LF # use LF line endings
|
||||||
UseTab: Neve # (Never,ForIndentation,ForContinuationAndIndentation,Always)
|
UseTab: Never # (Never,ForIndentation,ForContinuationAndIndentation,Always)
|
||||||
TabWidth: 4 # recommended to set this equal to IndentWidth
|
TabWidth: 4 # recommended to set this equal to IndentWidth
|
||||||
IndentWidth: 4 # how wide each indent is
|
IndentWidth: 4 # how wide each indent is
|
||||||
ContinuationIndentWidth: 4 # width for a line continuation
|
ContinuationIndentWidth: 4 # width for a line continuation
|
||||||
|
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
# alignment options
|
# alignment options
|
||||||
@@ -90,26 +90,18 @@ ReferenceAlignment: Pointer # (Pointer,Left,Right,Middle)
|
|||||||
# ---------------------------
|
# ---------------------------
|
||||||
# include settings and sorting
|
# include settings and sorting
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
IncludeIsMainSourceRegex: '' # only [*.{c,cc,cpp,c++,cxx,m,mm}] are considered to be "main"
|
IncludeIsMainSourceRegex: '' # only [*.{c,cc,cpp,c++,cxx,m,mm}] are considered to be "main"
|
||||||
IncludeIsMainRegex: '([-_](test|unittest))?$' # regex used for identifying an include as "main", to assign catagory 0
|
IncludeIsMainRegex: '([-_](test|unittest))?$' # regex used for identifying an include as "main", to assign catagory 0
|
||||||
IncludeBlocks: Regroup # (Preserve,Merge,Regroup)
|
IncludeBlocks: Regroup # (Preserve,Merge,Regroup)
|
||||||
IncludeCategories:
|
IncludeCategories:
|
||||||
- Regex: '^<ext/.*\.h>'
|
- Regex: '^<.*\.h>' # system headers
|
||||||
Priority: 2
|
Priority: 1
|
||||||
SortPriority: 0
|
SortPriority: 0
|
||||||
CaseSensitive: false
|
CaseSensitive: true
|
||||||
- Regex: '^<.*\.h>'
|
- Regex: '^".*' # custom headers
|
||||||
Priority: 1
|
Priority: 2
|
||||||
SortPriority: 0
|
SortPriority: 0
|
||||||
CaseSensitive: false
|
CaseSensitive: true
|
||||||
- Regex: '^<.*'
|
|
||||||
Priority: 2
|
|
||||||
SortPriority: 0
|
|
||||||
CaseSensitive: false
|
|
||||||
- Regex: '.*'
|
|
||||||
Priority: 3
|
|
||||||
SortPriority: 0
|
|
||||||
CaseSensitive: false
|
|
||||||
|
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
# macro and language-specific settings
|
# macro and language-specific settings
|
||||||
@@ -137,116 +129,90 @@ WhitespaceSensitiveMacros:
|
|||||||
# ---------------------------
|
# ---------------------------
|
||||||
# additional formatting and sorting details
|
# additional formatting and sorting details
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
AllowAllArgumentsOnNextLine: true
|
AllowAllArgumentsOnNextLine: false
|
||||||
AllowAllParametersOfDeclarationOnNextLine: false
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
EmptyLineAfterAccessModifier: Never
|
EmptyLineAfterAccessModifier: Never # (Never,Leave,Always)
|
||||||
EmptyLineBeforeAccessModifier: LogicalBlock
|
EmptyLineBeforeAccessModifier: LogicalBlock # (Never,Leave,LogicalBlock,Always)
|
||||||
ExperimentalAutoDetectBinPacking: false
|
ExperimentalAutoDetectBinPacking: false
|
||||||
FixNamespaceComments: true # adds comments at namespace delimiters
|
FixNamespaceComments: true # adds comments at namespace delimiters
|
||||||
MaxEmptyLinesToKeep: 4
|
MaxEmptyLinesToKeep: 4 # what the maximum amount of empty lines that we're allowed to keep
|
||||||
ReflowComments: true # reflow comment text to match column limits
|
ReflowComments: true # reflow comment text to match column limits
|
||||||
RemoveBracesLLVM: false
|
RemoveBracesLLVM: false # don't automatically remove braces
|
||||||
SeparateDefinitionBlocks: Leave
|
SeparateDefinitionBlocks: Leave # (Leave,Always.Never)
|
||||||
ShortNamespaceLines: 1
|
ShortNamespaceLines: 1 # how many lines a namespaces can be to be regarded "short"
|
||||||
SortIncludes: CaseSensitive # (Never,CaseSensitive,CaseInsensitive)
|
SortIncludes: CaseSensitive # (Never,CaseSensitive,CaseInsensitive)
|
||||||
SortJavaStaticImport: Before
|
SortJavaStaticImport: Before # (After,Before)
|
||||||
SortUsingDeclarations: true
|
SortUsingDeclarations: LexicographicNumeric # (Never,Lexicographic,LexicographicNumeric)
|
||||||
|
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
# spacing options
|
# spacing options
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
SpaceAfterCStyleCast: false
|
SpaceAfterCStyleCast: false
|
||||||
SpaceAfterLogicalNot: false
|
SpaceAfterLogicalNot: false
|
||||||
SpaceAfterTemplateKeyword: true
|
SpaceAfterTemplateKeyword: false
|
||||||
SpaceBeforeAssignmentOperators: true
|
SpaceBeforeAssignmentOperators: true
|
||||||
SpaceBeforeCaseColon: false
|
SpaceBeforeCaseColon: false
|
||||||
SpaceBeforeCpp11BracedList: false
|
SpaceBeforeCpp11BracedList: false
|
||||||
SpaceBeforeCtorInitializerColon: true
|
SpaceBeforeCtorInitializerColon: true
|
||||||
SpaceBeforeInheritanceColon: true
|
SpaceBeforeInheritanceColon: true
|
||||||
SpaceBeforeParens: ControlStatements # (ControlStatements,ControlStatementsExceptControlMacros,NonEmptyParentheses,Always,Custom)
|
SpaceBeforeParens: ControlStatements # (ControlStatements,ControlStatementsExceptControlMacros,NonEmptyParentheses,Always,Custom)
|
||||||
SpaceBeforeParensOptions:
|
SpaceBeforeParensOptions:
|
||||||
AfterControlStatements: true
|
AfterControlStatements: true
|
||||||
AfterForeachMacros: true
|
AfterForeachMacros: true
|
||||||
AfterFunctionDefinitionName: false
|
AfterFunctionDefinitionName: false
|
||||||
AfterFunctionDeclarationName: false
|
AfterFunctionDeclarationName: false
|
||||||
AfterIfMacros: true
|
AfterIfMacros: true
|
||||||
AfterOverloadedOperator: false
|
AfterOverloadedOperator: false
|
||||||
BeforeNonEmptyParentheses: false
|
BeforeNonEmptyParentheses: false
|
||||||
SpaceAroundPointerQualifiers: Default
|
SpaceAroundPointerQualifiers: Default # (Default,Before,After,Both) recommend to use Default and let PointerAlignment decide
|
||||||
SpaceBeforeRangeBasedForLoopColon: true
|
SpaceBeforeRangeBasedForLoopColon: true
|
||||||
SpaceInEmptyBlock: false
|
SpaceInEmptyBlock: true
|
||||||
SpaceInEmptyParentheses: false
|
SpacesInParens: Custom
|
||||||
|
SpacesInParensOptions:
|
||||||
|
ExceptDoubleParentheses: false
|
||||||
|
InConditionalStatements: false
|
||||||
|
InCStyleCasts: false
|
||||||
|
Other: false
|
||||||
SpacesBeforeTrailingComments: 1
|
SpacesBeforeTrailingComments: 1
|
||||||
SpacesInAngles: Never
|
SpacesInAngles: Never # (Never,Always,Leave)
|
||||||
SpacesInConditionalStatement: false
|
SpacesInConditionalStatement: false
|
||||||
SpacesInContainerLiterals: true
|
SpacesInContainerLiterals: true
|
||||||
SpacesInCStyleCastParentheses: false
|
|
||||||
SpacesInLineCommentPrefix:
|
SpacesInLineCommentPrefix:
|
||||||
Minimum: 1
|
Minimum: 1
|
||||||
Maximum: 1
|
Maximum: 1
|
||||||
SpacesInParentheses: false
|
SpacesInParentheses: false
|
||||||
SpacesInSquareBrackets: false
|
SpacesInSquareBrackets: false
|
||||||
SpaceBeforeSquareBrackets: false
|
SpaceBeforeSquareBrackets: false
|
||||||
BitFieldColonSpacing: Both
|
BitFieldColonSpacing: Both # (Both,None,Before,After)
|
||||||
|
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
# indentation details
|
# indentation details
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
IndentAccessModifiers: false
|
IndentAccessModifiers: false
|
||||||
IndentCaseLabels: false
|
IndentCaseLabels: false
|
||||||
IndentCaseBlocks: false
|
IndentCaseBlocks: false
|
||||||
IndentGotoLabels: true
|
IndentGotoLabels: true
|
||||||
IndentPPDirectives: None
|
IndentExternBlock: AfterExternBlock # (AfterExternBlock,NoIndent,Indent)
|
||||||
IndentExternBlock: AfterExternBlock
|
IndentRequiresClause: false
|
||||||
IndentRequires: false
|
IndentPPDirectives: AfterHash # preprocessor indent style (None,AfterHash,BeforeHash)
|
||||||
PPIndentWidth: 1
|
PPIndentWidth: 1
|
||||||
|
|
||||||
# ---------------------------
|
|
||||||
# raw string literal formats
|
|
||||||
# ---------------------------
|
|
||||||
RawStringFormats:
|
|
||||||
- Language: Cpp
|
|
||||||
Delimiters:
|
|
||||||
- cc
|
|
||||||
- CC
|
|
||||||
- cpp
|
|
||||||
- Cpp
|
|
||||||
- CPP
|
|
||||||
- 'c++'
|
|
||||||
- 'C++'
|
|
||||||
CanonicalDelimiter: ''
|
|
||||||
BasedOnStyle: google
|
|
||||||
- Language: TextProto
|
|
||||||
Delimiters:
|
|
||||||
- pb
|
|
||||||
- PB
|
|
||||||
- proto
|
|
||||||
- PROTO
|
|
||||||
EnclosingFunctions:
|
|
||||||
- EqualsProto
|
|
||||||
- EquivToProto
|
|
||||||
- PARSE_PARTIAL_TEXT_PROTO
|
|
||||||
- PARSE_TEST_PROTO
|
|
||||||
- PARSE_TEXT_PROTO
|
|
||||||
- ParseTextOrDie
|
|
||||||
- ParseTextProtoOrDie
|
|
||||||
- ParseTestProto
|
|
||||||
- ParsePartialTestProto
|
|
||||||
CanonicalDelimiter: pb
|
|
||||||
BasedOnStyle: google
|
|
||||||
|
|
||||||
|
---
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
# JavaScript specific settings
|
# JavaScript specific settings
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
JavaScriptQuotes: Double
|
Language: JavaScript
|
||||||
|
JavaScriptQuotes: Double
|
||||||
JavaScriptWrapImports: true
|
JavaScriptWrapImports: true
|
||||||
|
|
||||||
|
---
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
# Objective-C specific settings
|
# Objective-C specific settings
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
ObjCBinPackProtocolList: Never
|
Language: ObjC
|
||||||
ObjCBlockIndentWidth: 4
|
ObjCBinPackProtocolList: Never
|
||||||
|
ObjCBlockIndentWidth: 4
|
||||||
ObjCBreakBeforeNestedBlockParam: true
|
ObjCBreakBeforeNestedBlockParam: true
|
||||||
ObjCSpaceAfterProperty: false
|
ObjCSpaceAfterProperty: false
|
||||||
ObjCSpaceBeforeProtocolList: true
|
ObjCSpaceBeforeProtocolList: true
|
||||||
...
|
...
|
||||||
|
|||||||
Reference in New Issue
Block a user