-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move clang-format to the root directory
- Loading branch information
Showing
7 changed files
with
252 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,235 @@ | ||
--- | ||
# Access modifier should be aligned to braces. | ||
AccessModifierOffset: -4 | ||
|
||
# Align pointer to the left (to the type). | ||
PointerAlignment: Left | ||
|
||
# The column limit for Zserio. | ||
ColumnLimit: 112 | ||
|
||
# Always break after template declaration. | ||
AlwaysBreakTemplateDeclarations: Yes | ||
|
||
# Indent width for line continuations. | ||
ContinuationIndentWidth: 8 | ||
|
||
# Settings for constructor initializers. | ||
BreakConstructorInitializers: AfterColon | ||
ConstructorInitializerIndentWidth: 8 | ||
PackConstructorInitializers: Never | ||
|
||
# Don’t align, instead use ContinuationIndentWidth. | ||
AlignAfterOpenBracket: DontAlign | ||
|
||
# Don't align trailing comments. | ||
AlignTrailingComments: false | ||
|
||
# Don't align operands. | ||
AlignOperands: DontAlign | ||
|
||
# Indent preprocessor directives. | ||
IndentPPDirectives: BeforeHash | ||
|
||
# Improve indentation of chained method calls. | ||
PenaltyIndentedWhitespace: 10 | ||
|
||
# Allow brace wrapping for unions . | ||
# Allow empty braces on the same line for functions, records and namespaces. | ||
BreakBeforeBraces: Custom | ||
BraceWrapping: | ||
AfterCaseLabel: false | ||
AfterClass: true | ||
AfterControlStatement: Always | ||
AfterEnum: true | ||
AfterFunction: true | ||
AfterNamespace: true | ||
AfterObjCDeclaration: true | ||
AfterStruct: true | ||
AfterUnion: true | ||
AfterExternBlock: true | ||
BeforeCatch: true | ||
BeforeElse: true | ||
BeforeLambdaBody: false | ||
BeforeWhile: false | ||
IndentBraces: false | ||
SplitEmptyFunction: false | ||
SplitEmptyRecord: false | ||
SplitEmptyNamespace: false | ||
|
||
# Indent case blocks. | ||
IndentCaseBlocks: true | ||
|
||
# All other defaults from Microsoft style. | ||
AlignArrayOfStructures: None | ||
AlignConsecutiveMacros: None | ||
AlignConsecutiveAssignments: None | ||
AlignConsecutiveBitFields: None | ||
AlignConsecutiveDeclarations: None | ||
AlignEscapedNewlines: Right | ||
AllowAllArgumentsOnNextLine: true | ||
AllowAllParametersOfDeclarationOnNextLine: true | ||
AllowShortEnumsOnASingleLine: false | ||
AllowShortBlocksOnASingleLine: Never | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: None | ||
AllowShortLambdasOnASingleLine: All | ||
AllowShortIfStatementsOnASingleLine: Never | ||
AllowShortLoopsOnASingleLine: false | ||
AlwaysBreakAfterDefinitionReturnType: None | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakBeforeMultilineStrings: false | ||
AttributeMacros: | ||
- __capability | ||
BinPackArguments: true | ||
BinPackParameters: true | ||
BreakBeforeBinaryOperators: None | ||
BreakBeforeConceptDeclarations: true | ||
BreakBeforeInheritanceComma: false | ||
BreakInheritanceList: BeforeColon | ||
BreakBeforeTernaryOperators: true | ||
BreakConstructorInitializersBeforeComma: false | ||
BreakAfterJavaFieldAnnotations: false | ||
BreakStringLiterals: true | ||
CommentPragmas: '^ IWYU pragma:' | ||
QualifierAlignment: Leave | ||
CompactNamespaces: false | ||
Cpp11BracedListStyle: true | ||
DeriveLineEnding: true | ||
DerivePointerAlignment: false | ||
DisableFormat: false | ||
EmptyLineAfterAccessModifier: Never | ||
EmptyLineBeforeAccessModifier: LogicalBlock | ||
ExperimentalAutoDetectBinPacking: false | ||
BasedOnStyle: '' | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: false | ||
AllowAllConstructorInitializersOnNextLine: true | ||
FixNamespaceComments: true | ||
ForEachMacros: | ||
- foreach | ||
- Q_FOREACH | ||
- BOOST_FOREACH | ||
IfMacros: | ||
- KJ_IF_MAYBE | ||
IncludeIsMainRegex: '(Test)?$' | ||
IncludeIsMainSourceRegex: '' | ||
IndentAccessModifiers: false | ||
IndentCaseLabels: false | ||
IndentGotoLabels: true | ||
IndentExternBlock: AfterExternBlock | ||
IndentRequires: false | ||
IndentWidth: 4 | ||
IndentWrappedFunctionNames: false | ||
InsertTrailingCommas: None | ||
JavaScriptQuotes: Leave | ||
JavaScriptWrapImports: true | ||
KeepEmptyLinesAtTheStartOfBlocks: true | ||
LambdaBodyIndentation: Signature | ||
MacroBlockBegin: '' | ||
MacroBlockEnd: '' | ||
MaxEmptyLinesToKeep: 1 | ||
NamespaceIndentation: None | ||
ObjCBinPackProtocolList: Auto | ||
ObjCBlockIndentWidth: 2 | ||
ObjCBreakBeforeNestedBlockParam: true | ||
ObjCSpaceAfterProperty: false | ||
ObjCSpaceBeforeProtocolList: true | ||
PenaltyBreakAssignment: 2 | ||
PenaltyBreakBeforeFirstCallParameter: 19 | ||
PenaltyBreakComment: 300 | ||
PenaltyBreakFirstLessLess: 120 | ||
PenaltyBreakOpenParenthesis: 0 | ||
PenaltyBreakString: 1000 | ||
PenaltyBreakTemplateDeclaration: 10 | ||
PenaltyExcessCharacter: 1000000 | ||
PenaltyReturnTypeOnItsOwnLine: 1000 | ||
PPIndentWidth: -1 | ||
ReferenceAlignment: Pointer | ||
ReflowComments: true | ||
RemoveBracesLLVM: false | ||
SeparateDefinitionBlocks: Leave | ||
ShortNamespaceLines: 1 | ||
SortIncludes: CaseSensitive | ||
SortJavaStaticImport: Before | ||
SortUsingDeclarations: true | ||
SpaceAfterCStyleCast: false | ||
SpaceAfterLogicalNot: false | ||
SpaceAfterTemplateKeyword: true | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeCaseColon: false | ||
SpaceBeforeCpp11BracedList: false | ||
SpaceBeforeCtorInitializerColon: true | ||
SpaceBeforeInheritanceColon: true | ||
SpaceBeforeParens: ControlStatements | ||
SpaceBeforeParensOptions: | ||
AfterControlStatements: true | ||
AfterForeachMacros: true | ||
AfterFunctionDefinitionName: false | ||
AfterFunctionDeclarationName: false | ||
AfterIfMacros: true | ||
AfterOverloadedOperator: false | ||
BeforeNonEmptyParentheses: false | ||
SpaceAroundPointerQualifiers: Default | ||
SpaceBeforeRangeBasedForLoopColon: true | ||
SpaceInEmptyBlock: false | ||
SpaceInEmptyParentheses: false | ||
SpacesBeforeTrailingComments: 1 | ||
SpacesInAngles: Never | ||
SpacesInConditionalStatement: false | ||
SpacesInContainerLiterals: true | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInLineCommentPrefix: | ||
Minimum: 1 | ||
Maximum: -1 | ||
SpacesInParentheses: false | ||
SpacesInSquareBrackets: false | ||
SpaceBeforeSquareBrackets: false | ||
BitFieldColonSpacing: Both | ||
Standard: Latest | ||
StatementAttributeLikeMacros: | ||
- Q_EMIT | ||
StatementMacros: | ||
- Q_UNUSED | ||
- QT_REQUIRE_VERSION | ||
TabWidth: 4 | ||
UseCRLF: false | ||
UseTab: Never | ||
WhitespaceSensitiveMacros: | ||
- STRINGIZE | ||
- PP_STRINGIZE | ||
- BOOST_PP_STRINGIZE | ||
- NS_SWIFT_NAME | ||
- CF_SWIFT_NAME | ||
--- | ||
# C++ specific rules | ||
Language: Cpp | ||
|
||
# Regroup and sort includes. | ||
IncludeBlocks: Regroup | ||
IncludeCategories: | ||
# System headers in <>. | ||
- Regex: '<.*>' | ||
Priority: -2 | ||
CaseSensitive: false | ||
# Headers in "" in current directory. | ||
- Regex: '"[^/\]+"' | ||
Priority: 0 | ||
CaseSensitive: false | ||
# Headers in "" in different directory. | ||
- Regex: '".*"' | ||
Priority: -1 | ||
CaseSensitive: false | ||
# All other headers. | ||
- Regex: '.*' | ||
Priority: 1 | ||
CaseSensitive: false | ||
--- | ||
# Java specific rules | ||
Language: Java | ||
|
||
# Set Java import groups. | ||
JavaImportGroups: ['java', 'org', 'zserio', 'test_object'] | ||
|
||
# Break after Java annotations. | ||
BreakAfterJavaFieldAnnotations: true | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.