|
| 1 | +# Copyright (C) 2020-2024 CERN and UCLouvain. |
| 2 | +# Licensed under the GNU Lesser General Public License (version 3 or later). |
| 3 | +# Created by: A. Valassi (Feb 2022) for the MG5aMC CUDACPP plugin. |
| 4 | +# Further modified by: A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. |
| 5 | +# --- |
| 6 | +# February 2022: latest draft for clang 13.0.0 (BasedOnStyle: Google) |
| 7 | +# See https://releases.llvm.org/13.0.0/tools/clang/docs/ClangFormatStyleOptions.html |
| 8 | +--- |
| 9 | +Language: Cpp |
| 10 | +BasedOnStyle: Google |
| 11 | + |
| 12 | +AccessModifierOffset: -2 # AV was -1 |
| 13 | +AlignAfterOpenBracket: Align # AV ok |
| 14 | +AlignArrayOfStructures: None # AV ok (alternative: Right, but code-generating it would be too complex) |
| 15 | +AlignConsecutiveAssignments: None # AV ok |
| 16 | +AlignConsecutiveBitFields: None # AV ok |
| 17 | +AlignConsecutiveDeclarations: None # AV ok |
| 18 | +AlignConsecutiveMacros: None # AV ok |
| 19 | +AlignEscapedNewlines: DontAlign # AV was Left |
| 20 | +AlignOperands: DontAlign # AV was Align |
| 21 | +AlignTrailingComments: true # AV ok |
| 22 | +AllowAllArgumentsOnNextLine: true # AV ok(?) |
| 23 | +AllowAllConstructorInitializersOnNextLine: true # AV ok (NB: relevant only if ConstructorInitializerAllOnOneLineOrOnePerLine=true) |
| 24 | +AllowAllParametersOfDeclarationOnNextLine: true # AV ok(?) |
| 25 | +AllowShortBlocksOnASingleLine: Always # AV was Never |
| 26 | +AllowShortEnumsOnASingleLine: true # AV ok |
| 27 | +AllowShortCaseLabelsOnASingleLine: true # AV was false |
| 28 | +AllowShortFunctionsOnASingleLine: All # AV ok |
| 29 | +AllowShortLambdasOnASingleLine: All # AV ok |
| 30 | +AllowShortIfStatementsOnASingleLine: WithoutElse # AV ok |
| 31 | +AllowShortLoopsOnASingleLine: true # AV ok |
| 32 | +###AlwaysBreakAfterDefinitionReturnType: None # AV keep defaults (deprecated) |
| 33 | +#AlwaysBreakAfterReturnType: All # AV use this initially, then switch to TopLevelDefinitions! |
| 34 | +AlwaysBreakAfterReturnType: TopLevelDefinitions # AV was None (altearnative: All?) |
| 35 | +AlwaysBreakBeforeMultilineStrings: false # AV was true |
| 36 | +AlwaysBreakTemplateDeclarations: Yes # AV ok |
| 37 | +###AttributeMacros: # AV keep defaults (NB this is not about '__host__' attributes, see llvm/llvm-project/issues/45968) |
| 38 | +### - __capability |
| 39 | +BinPackArguments: false # AV was true |
| 40 | +BinPackParameters: false # AV was true |
| 41 | +BitFieldColonSpacing: Both # AV ok |
| 42 | +BraceWrapping: # (NB: this is only relevant for "BreakBeforeBraces: Custom") |
| 43 | + AfterCaseLabel: true # AV was false |
| 44 | + AfterClass: true # AV was false |
| 45 | + AfterControlStatement: Always # AV was Never |
| 46 | + AfterEnum: true # AV was false |
| 47 | + AfterFunction: true # AV was false |
| 48 | + AfterNamespace: true # AV was false |
| 49 | + AfterObjCDeclaration: true # AV was false |
| 50 | + AfterStruct: true # AV was false |
| 51 | + AfterUnion: true # AV was false |
| 52 | + AfterExternBlock: true # AV was false (NB: does not work unless IndentExternBlock is AfterExternBlock?!) |
| 53 | + BeforeCatch: true # AV was false |
| 54 | + BeforeElse: true # AV was false |
| 55 | + BeforeLambdaBody: true # AV was false |
| 56 | + BeforeWhile: true # AV was false |
| 57 | + IndentBraces: false # AV ok |
| 58 | + SplitEmptyFunction: true # AV ok |
| 59 | + SplitEmptyRecord: true # AV ok |
| 60 | + SplitEmptyNamespace: true # AV ok |
| 61 | +BreakAfterJavaFieldAnnotations: false |
| 62 | +BreakBeforeBinaryOperators: None # AV ok |
| 63 | +BreakBeforeBraces: Custom # AV was Attach (alternative: Allman) |
| 64 | +BreakBeforeConceptDeclarations: true # AV ok |
| 65 | +###BreakBeforeInheritanceComma: false # (obsolete???) |
| 66 | +BreakBeforeTernaryOperators: true # AV ok |
| 67 | +###BreakConstructorInitializersBeforeComma: true # AV was false (obsolete???) |
| 68 | +BreakConstructorInitializers: BeforeComma # AV was BeforeColon |
| 69 | +BreakInheritanceList: BeforeColon # AV ok (alternative: BeforeComma?) |
| 70 | +BreakStringLiterals: false # AV was true |
| 71 | +ColumnLimit: 0 # AV was 80 |
| 72 | +###CommentPragmas: '^[^ ]*' # AV use SpacesInLineCommentPrefix Min=0 Max=1 to allow both "//comment" and "// comment" |
| 73 | +CompactNamespaces: false # AV ok |
| 74 | +ConstructorInitializerAllOnOneLineOrOnePerLine: true |
| 75 | +ConstructorInitializerIndentWidth: 2 # AV was 4 |
| 76 | +ContinuationIndentWidth: 2 # AV was 4 |
| 77 | +Cpp11BracedListStyle: true # AV ok |
| 78 | +DeriveLineEnding: false # AV was true |
| 79 | +DerivePointerAlignment: false # AV was true |
| 80 | +DisableFormat: false # AV ok |
| 81 | +EmptyLineAfterAccessModifier: Leave # AV was Never |
| 82 | +EmptyLineBeforeAccessModifier: Leave # AV was LogicalBlock |
| 83 | +ExperimentalAutoDetectBinPacking: false # AV ok ("use at your own risk") |
| 84 | +FixNamespaceComments: false # AV was true |
| 85 | +###ForEachMacros: # AV keep defaults |
| 86 | +### - foreach |
| 87 | +### - Q_FOREACH |
| 88 | +### - BOOST_FOREACH |
| 89 | +###IfMacros: # AV keep defaults |
| 90 | +### - KJ_IF_MAYBE |
| 91 | +IncludeBlocks: Regroup # AV ok |
| 92 | +IncludeCategories: |
| 93 | + - Regex: '^<ext/.*\.h>' |
| 94 | + Priority: 4 # AV was 2 |
| 95 | + SortPriority: 0 |
| 96 | + CaseSensitive: false |
| 97 | + - Regex: '^<.*\.h>' |
| 98 | + Priority: 5 # AV was 1 |
| 99 | + SortPriority: 0 |
| 100 | + CaseSensitive: false |
| 101 | + - Regex: '^<.*' |
| 102 | + Priority: 6 # AV was 2 |
| 103 | + SortPriority: 0 |
| 104 | + CaseSensitive: false |
| 105 | + - Regex: 'mgOnGpuConfig.h' |
| 106 | + Priority: 1 # AV new |
| 107 | + SortPriority: 0 |
| 108 | + CaseSensitive: false |
| 109 | + - Regex: 'mgOnGpu*.*' |
| 110 | + Priority: 2 # AV new |
| 111 | + SortPriority: 0 |
| 112 | + CaseSensitive: false |
| 113 | + - Regex: '.*' |
| 114 | + Priority: 3 # AV was 3 |
| 115 | + SortPriority: 0 |
| 116 | + CaseSensitive: false |
| 117 | +###IncludeIsMainRegex: '([-_](test|unittest))?$' # AV keep defaults |
| 118 | +###IncludeIsMainSourceRegex: '' # AV keep defaults |
| 119 | +IndentAccessModifiers: false # AV ok |
| 120 | +IndentCaseLabels: true # AV ok |
| 121 | +IndentCaseBlocks: false # AV ok |
| 122 | +IndentGotoLabels: false # AV was true |
| 123 | +IndentPPDirectives: None # AV ok (NB: AfterHash and BeforeHash do not seem to work as intended) |
| 124 | +###IndentExternBlock: Indent # AV was AfterExternBlock |
| 125 | +IndentExternBlock: AfterExternBlock # AV ok (only with Custom BraceWrapping.AfterExternBlock = true) |
| 126 | +IndentRequires: false # AV ok(?) |
| 127 | +IndentWidth: 2 # AV ok |
| 128 | +IndentWrappedFunctionNames: false # AV ok |
| 129 | +###InsertTrailingCommas: None # AV keep defaults (Java only?) |
| 130 | +###JavaScriptQuotes: Leave # AV irrelevant |
| 131 | +###JavaScriptWrapImports: true # AV irrelevant |
| 132 | +KeepEmptyLinesAtTheStartOfBlocks: false # AV ok |
| 133 | +LambdaBodyIndentation: Signature # AV ok |
| 134 | +###MacroBlockBegin: '' # AV keep defaults |
| 135 | +###MacroBlockEnd: '' # AV keep defaults |
| 136 | +MaxEmptyLinesToKeep: 1 # AV ok |
| 137 | +NamespaceIndentation: All # AV was None |
| 138 | +###ObjCBinPackProtocolList: Never # AV irrelevant |
| 139 | +###ObjCBlockIndentWidth: 2 # AV irrelevant |
| 140 | +###ObjCBreakBeforeNestedBlockParam: true # AV irrelevant |
| 141 | +###ObjCSpaceAfterProperty: false # AV irrelevant |
| 142 | +###ObjCSpaceBeforeProtocolList: true # AV irrelevant |
| 143 | +###PenaltyBreakAssignment: 2 # AV keep defaults |
| 144 | +###PenaltyBreakBeforeFirstCallParameter: 1 # AV keep defaults |
| 145 | +###PenaltyBreakComment: 300 # AV keep defaults |
| 146 | +###PenaltyBreakFirstLessLess: 120 # AV keep defaults |
| 147 | +###PenaltyBreakString: 1000 # AV keep defaults |
| 148 | +###PenaltyBreakTemplateDeclaration: 10 # AV keep defaults |
| 149 | +###PenaltyExcessCharacter: 1000000 # AV keep defaults |
| 150 | +###PenaltyReturnTypeOnItsOwnLine: 200 # AV keep defaults |
| 151 | +###PenaltyIndentedWhitespace: 0 # AV keep defaults |
| 152 | +PointerAlignment: Left # AV ok |
| 153 | +PPIndentWidth: 0 # AV was -1 |
| 154 | +###RawStringFormats: # AV keep defaults |
| 155 | +### - Language: Cpp |
| 156 | +### Delimiters: |
| 157 | +### - cc |
| 158 | +### - CC |
| 159 | +### - cpp |
| 160 | +### - Cpp |
| 161 | +### - CPP |
| 162 | +### - 'c++' |
| 163 | +### - 'C++' |
| 164 | +### CanonicalDelimiter: '' |
| 165 | +### BasedOnStyle: google |
| 166 | +### - Language: TextProto |
| 167 | +### Delimiters: |
| 168 | +### - pb |
| 169 | +### - PB |
| 170 | +### - proto |
| 171 | +### - PROTO |
| 172 | +### EnclosingFunctions: |
| 173 | +### - EqualsProto |
| 174 | +### - EquivToProto |
| 175 | +### - PARSE_PARTIAL_TEXT_PROTO |
| 176 | +### - PARSE_TEST_PROTO |
| 177 | +### - PARSE_TEXT_PROTO |
| 178 | +### - ParseTextOrDie |
| 179 | +### - ParseTextProtoOrDie |
| 180 | +### - ParseTestProto |
| 181 | +### - ParsePartialTestProto |
| 182 | +### CanonicalDelimiter: pb |
| 183 | +### BasedOnStyle: google |
| 184 | +ReferenceAlignment: Pointer # AV ok |
| 185 | +ReflowComments: false # AV was true |
| 186 | +ShortNamespaceLines: 1 # AV ok |
| 187 | +SortIncludes: CaseSensitive # AV ok |
| 188 | +###SortJavaStaticImport: Before # irrelevant |
| 189 | +SortUsingDeclarations: false # AV was true |
| 190 | +SpaceAfterCStyleCast: false # AV ok |
| 191 | +SpaceAfterLogicalNot: false # AV ok |
| 192 | +SpaceAfterTemplateKeyword: false # AV was true |
| 193 | +SpaceAroundPointerQualifiers: Default # AV ok (alternative: Before?) |
| 194 | +SpaceBeforeAssignmentOperators: true # AV ok |
| 195 | +SpaceBeforeCaseColon: false # AV ok |
| 196 | +SpaceBeforeCpp11BracedList: false # AV ok |
| 197 | +SpaceBeforeCtorInitializerColon: true # AV ok |
| 198 | +SpaceBeforeInheritanceColon: true # AV ok |
| 199 | +SpaceBeforeParens: Never # AV was ControlStatements |
| 200 | +SpaceBeforeRangeBasedForLoopColon: false # AV was true |
| 201 | +SpaceBeforeSquareBrackets: false # AV ok |
| 202 | +SpaceInEmptyBlock: false # AV ok |
| 203 | +SpaceInEmptyParentheses: false # AV ok |
| 204 | +SpacesBeforeTrailingComments: 1 # AV was 2 |
| 205 | +SpacesInAngles: Never # AV ok |
| 206 | +SpacesInConditionalStatement: false # AV ok (does this work?) |
| 207 | +SpacesInContainerLiterals: false # AV was true |
| 208 | +SpacesInCStyleCastParentheses: false # AV ok |
| 209 | +SpacesInLineCommentPrefix: |
| 210 | + Minimum: 0 # AV was 1 |
| 211 | + Maximum: 1 # AV was -1 |
| 212 | +SpacesInParentheses: true # AV was false |
| 213 | +SpacesInSquareBrackets: false # AV ok |
| 214 | +Standard: c++17 # AV was Auto |
| 215 | +###StatementAttributeLikeMacros: # AV keep defaults |
| 216 | +### - Q_EMIT |
| 217 | +###StatementMacros: # AV keep defaults |
| 218 | +### - Q_UNUSED |
| 219 | +### - QT_REQUIRE_VERSION |
| 220 | +###TabWidth: 8 # AV irrelevant if UseTab=Never? |
| 221 | +UseCRLF: false # AV ok (but set DeriveLineEnding=false) |
| 222 | +UseTab: Never # AV ok |
| 223 | +###WhitespaceSensitiveMacros: # AV keep defaults |
| 224 | +### - STRINGIZE |
| 225 | +### - PP_STRINGIZE |
| 226 | +### - BOOST_PP_STRINGIZE |
| 227 | +### - NS_SWIFT_NAME |
| 228 | +### - CF_SWIFT_NAME |
| 229 | +... |
0 commit comments