-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bumped and synchronised code-style definitions with GR4 (#186)
* bumped and synchronised code-style definitions with GR4 * Minor improvements from review Signed-off-by: Ralph J. Steinhagen <[email protected]> Signed-off-by: Alexander Krimm <[email protected]> Co-authored-by: Alexander Krimm <[email protected]>
- Loading branch information
1 parent
cbde0f5
commit 4a10a20
Showing
13 changed files
with
1,233 additions
and
525 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 |
---|---|---|
@@ -1,225 +1,20 @@ | ||
# .clang-format for Qt Creator | ||
# | ||
# This is for clang-format >= 5.0. | ||
# | ||
# The configuration below follows the Qt Creator Coding Rules [1] as closely as | ||
# possible. For documentation of the options, see [2]. | ||
# | ||
# Use ../../tests/manual/clang-format-for-qtc/test.cpp for documenting problems | ||
# or testing changes. | ||
# | ||
# In case you update this configuration please also update the qtcStyle() in src\plugins\clangformat\clangformatutils.cpp | ||
# | ||
# [1] https://doc-snapshots.qt.io/qtcreator-extending/coding-style.html | ||
# [2] https://clang.llvm.org/docs/ClangFormatStyleOptions.html | ||
# | ||
--- | ||
Language: Cpp | ||
AccessModifierOffset: -4 | ||
AlignAfterOpenBracket: DontAlign | ||
AlignConsecutiveAssignments: AcrossEmptyLines | ||
AlignConsecutiveDeclarations: AcrossEmptyLines | ||
AlignEscapedNewlines: DontAlign | ||
AlignOperands: AlignAfterOperator | ||
AlignTrailingComments: true | ||
AllowAllParametersOfDeclarationOnNextLine: true | ||
AllowAllArgumentsOnNextLine: true | ||
#PackConstructorInitializers: PCIS_CurrentLine # starting with clang 14 | ||
AllowAllConstructorInitializersOnNextLine: true | ||
AllowShortLambdasOnASingleLine: All | ||
BasedOnStyle: LLVM | ||
AllowShortCaseLabelsOnASingleLine: true | ||
AllowShortFunctionsOnASingleLine: All | ||
AllowShortIfStatementsOnASingleLine: Always | ||
AllowShortLoopsOnASingleLine: true | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakBeforeMultilineStrings: false | ||
AlwaysBreakTemplateDeclarations: MultiLine | ||
BinPackArguments: true | ||
BinPackParameters: true | ||
BraceWrapping: | ||
AfterCaseLabel: false | ||
AfterClass: false | ||
AfterControlStatement: Never | ||
AfterEnum: false | ||
AfterFunction: false | ||
AfterNamespace: false | ||
AfterObjCDeclaration: false | ||
AfterStruct: false | ||
AfterUnion: false | ||
BeforeCatch: false | ||
BeforeElse: false | ||
IndentBraces: false | ||
SplitEmptyFunction: false | ||
SplitEmptyRecord: false | ||
SplitEmptyNamespace: false | ||
BreakBeforeBinaryOperators: All | ||
BreakBeforeBraces: Custom | ||
BreakBeforeInheritanceComma: false | ||
BreakBeforeTernaryOperators: true | ||
BreakConstructorInitializersBeforeComma: false | ||
BreakConstructorInitializers: BeforeComma | ||
BreakAfterJavaFieldAnnotations: true | ||
BreakStringLiterals: true | ||
ColumnLimit: 0 | ||
CommentPragmas: '^ IWYU pragma:' | ||
CompactNamespaces: true | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
ConstructorInitializerIndentWidth: 4 | ||
ContinuationIndentWidth: 8 | ||
Cpp11BracedListStyle: false | ||
DerivePointerAlignment: false | ||
DisableFormat: false | ||
ExperimentalAutoDetectBinPacking: false | ||
FixNamespaceComments: true | ||
ForEachMacros: | ||
- forever # avoids { wrapped to next line | ||
- foreach | ||
- Q_FOREACH | ||
- BOOST_FOREACH | ||
IncludeCategories: | ||
- Regex: '^<Q.*' | ||
Priority: 200 | ||
IncludeIsMainRegex: '(Test)?$' | ||
IndentCaseLabels: false | ||
IndentWidth: 4 | ||
IndentWrappedFunctionNames: false | ||
JavaScriptQuotes: Leave | ||
JavaScriptWrapImports: true | ||
KeepEmptyLinesAtTheStartOfBlocks: false | ||
# Do not add QT_BEGIN_NAMESPACE/QT_END_NAMESPACE as this will indent lines in between. | ||
MacroBlockBegin: "" | ||
MacroBlockEnd: "" | ||
MaxEmptyLinesToKeep: 1 | ||
NamespaceIndentation: None | ||
ObjCBlockIndentWidth: 4 | ||
ObjCSpaceAfterProperty: false | ||
ObjCSpaceBeforeProtocolList: true | ||
PenaltyBreakAssignment: 150 | ||
PenaltyBreakBeforeFirstCallParameter: 300 | ||
PenaltyBreakComment: 500 | ||
PenaltyBreakFirstLessLess: 400 | ||
PenaltyBreakString: 600 | ||
PenaltyExcessCharacter: 50 | ||
PenaltyReturnTypeOnItsOwnLine: 300 | ||
PointerAlignment: Right | ||
ReflowComments: true | ||
SortIncludes: CaseInsensitive | ||
SortUsingDeclarations: true | ||
SpaceAfterCStyleCast: true | ||
SpaceAfterTemplateKeyword: false | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeParens: ControlStatements | ||
SpaceInEmptyParentheses: false | ||
SpacesBeforeTrailingComments: 1 | ||
SpacesInAngles: false | ||
SpacesInContainerLiterals: false | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInParentheses: false | ||
SpacesInSquareBrackets: false | ||
Standard: c++20 | ||
TabWidth: 4 | ||
UseTab: Never | ||
--- | ||
Language: Java | ||
JavaImportGroups: [ 'java', 'javax', 'javafx', 'org', 'io', 'com', 'de.gsi' ] | ||
AccessModifierOffset: -4 | ||
# 2000 is a workaround to keep "unlimited" column length, since 0 doesn't always work as expected. | ||
# For the rationale behind the "unlimited" column length policy, please refer to CORE_DEVELOPMENT_GUIDELINE.md | ||
ColumnLimit: 2000 | ||
AlignAfterOpenBracket: DontAlign | ||
AlignConsecutiveAssignments: None | ||
AlignConsecutiveDeclarations: None | ||
AlignEscapedNewlines: DontAlign | ||
AlignOperands: AlignAfterOperator | ||
AlignTrailingComments: false | ||
AllowAllParametersOfDeclarationOnNextLine: true | ||
AllowShortLambdasOnASingleLine: All | ||
AllowShortCaseLabelsOnASingleLine: true | ||
AllowShortFunctionsOnASingleLine: All | ||
AllowShortIfStatementsOnASingleLine: Always | ||
AllowShortLoopsOnASingleLine: false | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakBeforeMultilineStrings: false | ||
AlwaysBreakTemplateDeclarations: Yes | ||
BinPackArguments: true | ||
BinPackParameters: true | ||
BraceWrapping: | ||
AfterClass: false | ||
AfterControlStatement: Never | ||
AfterEnum: false | ||
AfterFunction: false | ||
AfterNamespace: false | ||
AfterObjCDeclaration: false | ||
AfterStruct: false | ||
AfterUnion: false | ||
BeforeCatch: false | ||
BeforeElse: false | ||
IndentBraces: false | ||
SplitEmptyFunction: true | ||
SplitEmptyRecord: true | ||
SplitEmptyNamespace: true | ||
BreakBeforeBinaryOperators: All | ||
BreakBeforeBraces: Custom | ||
BreakBeforeInheritanceComma: false | ||
BreakBeforeTernaryOperators: true | ||
BreakConstructorInitializersBeforeComma: false | ||
BreakConstructorInitializers: BeforeComma | ||
BreakAfterJavaFieldAnnotations: true | ||
BreakStringLiterals: true | ||
ColumnLimit: 0 | ||
CommentPragmas: '^ IWYU pragma:' | ||
CompactNamespaces: false | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
ConstructorInitializerIndentWidth: 4 | ||
ContinuationIndentWidth: 8 | ||
Cpp11BracedListStyle: false | ||
DerivePointerAlignment: false | ||
DisableFormat: false | ||
ExperimentalAutoDetectBinPacking: false | ||
FixNamespaceComments: true | ||
ForEachMacros: | ||
- forever # avoids { wrapped to next line | ||
- foreach | ||
- Q_FOREACH | ||
- BOOST_FOREACH | ||
IncludeCategories: | ||
- Regex: '^<Q.*' | ||
Priority: 200 | ||
IncludeIsMainRegex: '(Test)?$' | ||
IndentCaseLabels: false | ||
BreakBeforeBraces: Attach | ||
IndentWidth: 4 | ||
IndentWrappedFunctionNames: false | ||
JavaScriptQuotes: Leave | ||
JavaScriptWrapImports: true | ||
KeepEmptyLinesAtTheStartOfBlocks: false | ||
# Do not add QT_BEGIN_NAMESPACE/QT_END_NAMESPACE as this will indent lines in between. | ||
MacroBlockBegin: "" | ||
MacroBlockEnd: "" | ||
MaxEmptyLinesToKeep: 2 | ||
NamespaceIndentation: None | ||
ObjCBlockIndentWidth: 4 | ||
ObjCSpaceAfterProperty: false | ||
ObjCSpaceBeforeProtocolList: true | ||
PenaltyBreakAssignment: 150 | ||
PenaltyBreakBeforeFirstCallParameter: 300 | ||
PenaltyBreakComment: 500 | ||
PenaltyBreakFirstLessLess: 400 | ||
PenaltyBreakString: 600 | ||
PenaltyExcessCharacter: 50 | ||
PenaltyReturnTypeOnItsOwnLine: 300 | ||
PointerAlignment: Right | ||
ReflowComments: true | ||
SortIncludes: CaseInsensitive | ||
SortUsingDeclarations: true | ||
SpaceAfterCStyleCast: true | ||
AccessModifierOffset: -4 | ||
IndentRequiresClause: false | ||
AllowShortCompoundRequirementOnASingleLine: true | ||
AlignConsecutiveAssignments: true | ||
AlignConsecutiveDeclarations: true | ||
AlignConsecutiveMacros: true | ||
MaxEmptyLinesToKeep: 1 | ||
AlwaysBreakTemplateDeclarations: true | ||
PointerAlignment: Left | ||
ReferenceAlignment: Left | ||
SpaceAfterTemplateKeyword: false | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeParens: ControlStatements | ||
SpaceInEmptyParentheses: false | ||
SpacesBeforeTrailingComments: 1 | ||
SpacesInAngles: false | ||
SpacesInContainerLiterals: false | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInParentheses: false | ||
SpacesInSquareBrackets: false | ||
Standard: c++20 | ||
TabWidth: 4 | ||
UseTab: Never | ||
|
||
InsertBraces: 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
Oops, something went wrong.