mirror of
				https://github.com/Xahau/xahaud.git
				synced 2025-11-04 10:45:50 +00:00 
			
		
		
		
	Add .clang-format rules and update code style
This commit is contained in:
		
							
								
								
									
										87
									
								
								.clang-format
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								.clang-format
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,87 @@
 | 
			
		||||
---
 | 
			
		||||
Language:        Cpp
 | 
			
		||||
AccessModifierOffset: -4
 | 
			
		||||
AlignAfterOpenBracket: AlwaysBreak
 | 
			
		||||
AlignConsecutiveAssignments: false
 | 
			
		||||
AlignConsecutiveDeclarations: false
 | 
			
		||||
AlignEscapedNewlinesLeft: true
 | 
			
		||||
AlignOperands: false
 | 
			
		||||
AlignTrailingComments: true
 | 
			
		||||
AllowAllParametersOfDeclarationOnNextLine: false
 | 
			
		||||
AllowShortBlocksOnASingleLine: false
 | 
			
		||||
AllowShortCaseLabelsOnASingleLine: false
 | 
			
		||||
AllowShortFunctionsOnASingleLine: false
 | 
			
		||||
AllowShortIfStatementsOnASingleLine: false
 | 
			
		||||
AllowShortLoopsOnASingleLine: false
 | 
			
		||||
AlwaysBreakAfterReturnType: All
 | 
			
		||||
AlwaysBreakBeforeMultilineStrings: true
 | 
			
		||||
AlwaysBreakTemplateDeclarations: true
 | 
			
		||||
BinPackArguments: false
 | 
			
		||||
BinPackParameters: false
 | 
			
		||||
BraceWrapping:   
 | 
			
		||||
  AfterClass:      true
 | 
			
		||||
  AfterControlStatement: true
 | 
			
		||||
  AfterEnum:       false
 | 
			
		||||
  AfterFunction:   true
 | 
			
		||||
  AfterNamespace:  false
 | 
			
		||||
  AfterObjCDeclaration: true
 | 
			
		||||
  AfterStruct:     true
 | 
			
		||||
  AfterUnion:      true
 | 
			
		||||
  BeforeCatch:     true
 | 
			
		||||
  BeforeElse:      true
 | 
			
		||||
  IndentBraces:    false
 | 
			
		||||
BreakBeforeBinaryOperators: false
 | 
			
		||||
BreakBeforeBraces: Custom
 | 
			
		||||
BreakBeforeTernaryOperators: true
 | 
			
		||||
BreakConstructorInitializersBeforeComma: true
 | 
			
		||||
ColumnLimit:     80
 | 
			
		||||
CommentPragmas:  '^ IWYU pragma:'
 | 
			
		||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
 | 
			
		||||
ConstructorInitializerIndentWidth: 4
 | 
			
		||||
ContinuationIndentWidth: 4
 | 
			
		||||
Cpp11BracedListStyle: true
 | 
			
		||||
DerivePointerAlignment: false
 | 
			
		||||
DisableFormat:   false
 | 
			
		||||
ExperimentalAutoDetectBinPacking: false
 | 
			
		||||
ForEachMacros:   [ foreach,   Q_FOREACH,  BOOST_FOREACH ]
 | 
			
		||||
IncludeCategories: 
 | 
			
		||||
  - Regex:           '^<(BeastConfig)'
 | 
			
		||||
    Priority:        0
 | 
			
		||||
  - Regex:           '^<(ripple)/'
 | 
			
		||||
    Priority:        2
 | 
			
		||||
  - Regex:           '^<(boost)/'
 | 
			
		||||
    Priority:        3
 | 
			
		||||
  - Regex:           '.*'
 | 
			
		||||
    Priority:        4
 | 
			
		||||
IncludeIsMainRegex: '$'
 | 
			
		||||
IndentCaseLabels: true
 | 
			
		||||
IndentFunctionDeclarationAfterType: false
 | 
			
		||||
IndentWidth:     4
 | 
			
		||||
IndentWrappedFunctionNames: false
 | 
			
		||||
KeepEmptyLinesAtTheStartOfBlocks: false
 | 
			
		||||
MaxEmptyLinesToKeep: 1
 | 
			
		||||
NamespaceIndentation: None
 | 
			
		||||
ObjCSpaceAfterProperty: false
 | 
			
		||||
ObjCSpaceBeforeProtocolList: false
 | 
			
		||||
PenaltyBreakBeforeFirstCallParameter: 1
 | 
			
		||||
PenaltyBreakComment: 300
 | 
			
		||||
PenaltyBreakFirstLessLess: 120
 | 
			
		||||
PenaltyBreakString: 1000
 | 
			
		||||
PenaltyExcessCharacter: 1000000
 | 
			
		||||
PenaltyReturnTypeOnItsOwnLine: 200
 | 
			
		||||
PointerAlignment: Left
 | 
			
		||||
ReflowComments:  true
 | 
			
		||||
SortIncludes:    true
 | 
			
		||||
SpaceAfterCStyleCast: false
 | 
			
		||||
SpaceBeforeAssignmentOperators: true
 | 
			
		||||
SpaceBeforeParens: ControlStatements
 | 
			
		||||
SpaceInEmptyParentheses: false
 | 
			
		||||
SpacesBeforeTrailingComments: 2
 | 
			
		||||
SpacesInAngles:  false
 | 
			
		||||
SpacesInContainerLiterals: true
 | 
			
		||||
SpacesInCStyleCastParentheses: false
 | 
			
		||||
SpacesInParentheses: false
 | 
			
		||||
SpacesInSquareBrackets: false
 | 
			
		||||
Standard:        Cpp11
 | 
			
		||||
TabWidth:        8
 | 
			
		||||
UseTab:          Never
 | 
			
		||||
		Reference in New Issue
	
	Block a user