Bump our clang-format standard from llvm 12 to llvm 17, and our C++ standard (for formatting) to 17. Fixes/improvements along the way: * Moved the clang-format CI test from an aswf container to bare Ubuntu to make it run faster -- it doesn't need most of the dependencies, so there's no point wasting 2 minutes or so downloading a container. * build_llvm.bash: Make sure llvm installs when needed, even if not using clang. * gh-installdeps.bash: Setting SKIP_SYSTEM_DEPS_INSTALL=1 skips installation of many non-essential dependencies. There is some reformatting here and there as 12->17 changed some formatting choices somewhat, but it's fairly minor. Most changes are improvements, some are neutral, a few are inexplicable but not less readable than before. We've long since accepted the tradeoff that using clang-format makes some things formatted differently/worse than we would have preferred, but we deem it worthy of the benefit of having it all 10% automatic and never fighting over formatting in PRs. --------- Signed-off-by: Larry Gritz <lg@larrygritz.com>
132 lines
3.7 KiB
YAML
132 lines
3.7 KiB
YAML
Language: Cpp
|
|
BasedOnStyle: WebKit
|
|
|
|
AccessModifierOffset: -4
|
|
AlignAfterOpenBracket: Align
|
|
AlignConsecutiveAssignments: true
|
|
#AlignConsecutiveAssignments: Consecutive
|
|
#AlignConsecutiveBitFields: Consecutive
|
|
AlignConsecutiveDeclarations: false
|
|
#AlignConsecutiveDeclarations: None
|
|
AlignEscapedNewlines: Left
|
|
AlignOperands: true
|
|
AlignTrailingComments: true
|
|
AllowAllArgumentsOnNextLine: true
|
|
AllowAllConstructorInitializersOnNextLine: true
|
|
AllowAllParametersOfDeclarationOnNextLine: false
|
|
AllowShortBlocksOnASingleLine: true
|
|
AllowShortCaseLabelsOnASingleLine: true
|
|
AllowShortFunctionsOnASingleLine: All
|
|
AllowShortLambdasOnASingleLine: All
|
|
AllowShortIfStatementsOnASingleLine: Never
|
|
AllowShortLoopsOnASingleLine: false
|
|
AlwaysBreakAfterDefinitionReturnType: None
|
|
AlwaysBreakAfterReturnType: TopLevel
|
|
AlwaysBreakBeforeMultilineStrings: false
|
|
AlwaysBreakTemplateDeclarations: MultiLine
|
|
BinPackArguments: true
|
|
BinPackParameters: true
|
|
BraceWrapping:
|
|
AfterCaseLabel: false
|
|
AfterClass: false
|
|
AfterControlStatement: false
|
|
AfterEnum: false
|
|
AfterFunction: true
|
|
AfterNamespace: false
|
|
AfterObjCDeclaration: false
|
|
AfterStruct: false
|
|
AfterUnion: false
|
|
AfterExternBlock: false
|
|
BeforeCatch: false
|
|
BeforeElse: false
|
|
IndentBraces: false
|
|
SplitEmptyFunction: false
|
|
SplitEmptyRecord: false
|
|
SplitEmptyNamespace: false
|
|
BreakBeforeBinaryOperators: All
|
|
BreakBeforeBraces: WebKit
|
|
BreakBeforeInheritanceComma: false
|
|
BreakInheritanceList: BeforeColon
|
|
BreakBeforeTernaryOperators: true
|
|
BreakConstructorInitializersBeforeComma: false
|
|
BreakConstructorInitializers: BeforeComma
|
|
BreakAfterJavaFieldAnnotations: false
|
|
BreakStringLiterals: false
|
|
ColumnLimit: 80
|
|
CommentPragmas: '^ IWYU pragma:'
|
|
CompactNamespaces: false
|
|
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
|
ConstructorInitializerIndentWidth: 4
|
|
ContinuationIndentWidth: 4
|
|
Cpp11BracedListStyle: false
|
|
DerivePointerAlignment: false
|
|
DisableFormat: false
|
|
ExperimentalAutoDetectBinPacking: false
|
|
FixNamespaceComments: true
|
|
ForEachMacros:
|
|
- foreach
|
|
- Q_FOREACH
|
|
- BOOST_FOREACH
|
|
IncludeBlocks: Preserve
|
|
IncludeCategories:
|
|
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
|
Priority: 2
|
|
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
|
|
Priority: 3
|
|
- Regex: '.*'
|
|
Priority: 1
|
|
IncludeIsMainRegex: '(Test)?$'
|
|
IndentCaseLabels: false
|
|
IndentExternBlock: NoIndent
|
|
IndentPPDirectives: AfterHash
|
|
IndentWidth: 4
|
|
IndentWrappedFunctionNames: false
|
|
JavaScriptQuotes: Leave
|
|
JavaScriptWrapImports: true
|
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
|
MacroBlockBegin: ''
|
|
MacroBlockEnd: ''
|
|
MaxEmptyLinesToKeep: 3
|
|
NamespaceIndentation: Inner
|
|
ObjCBinPackProtocolList: Auto
|
|
ObjCBlockIndentWidth: 4
|
|
ObjCSpaceAfterProperty: true
|
|
ObjCSpaceBeforeProtocolList: true
|
|
PenaltyBreakAssignment: 40
|
|
PenaltyBreakBeforeFirstCallParameter: 100
|
|
PenaltyBreakComment: 300
|
|
PenaltyBreakFirstLessLess: 120
|
|
PenaltyBreakString: 1000
|
|
PenaltyBreakTemplateDeclaration: 10
|
|
PenaltyExcessCharacter: 75
|
|
PenaltyReturnTypeOnItsOwnLine: 50
|
|
PointerAlignment: Left
|
|
ReflowComments: false
|
|
SortIncludes: true
|
|
SortUsingDeclarations: true
|
|
SpaceAfterCStyleCast: false
|
|
SpaceAfterLogicalNot: false
|
|
SpaceAfterTemplateKeyword: false
|
|
SpaceBeforeAssignmentOperators: true
|
|
SpaceBeforeCpp11BracedList: true
|
|
SpaceBeforeCtorInitializerColon: true
|
|
SpaceBeforeInheritanceColon: true
|
|
SpaceBeforeParens: ControlStatements
|
|
SpaceBeforeRangeBasedForLoopColon: true
|
|
SpaceInEmptyBlock: false
|
|
SpaceInEmptyParentheses: false
|
|
SpacesBeforeTrailingComments: 2
|
|
SpacesInAngles: false
|
|
SpacesInContainerLiterals: true
|
|
SpacesInCStyleCastParentheses: false
|
|
SpacesInParentheses: false
|
|
SpacesInSquareBrackets: false
|
|
Standard: c++17
|
|
StatementMacros:
|
|
- Q_UNUSED
|
|
- QT_REQUIRE_VERSION
|
|
TabWidth: 8
|
|
UseTab: Never
|
|
#...
|
|
|