Last active
February 6, 2026 14:48
-
-
Save hugoarnal/19dd6a63970047872d99328d658c8988 to your computer and use it in GitHub Desktop.
Own modified clang-format for C++
This file contains hidden or 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
| # Modified from https://github.com/Davphla/clang-format-epitech | |
| --- | |
| BasedOnStyle: LLVM | |
| AccessModifierOffset: 0 | |
| AlignAfterOpenBracket: DontAlign | |
| AlignArrayOfStructures: None | |
| AlignConsecutiveAssignments: None | |
| AlignConsecutiveBitFields: None | |
| AlignConsecutiveDeclarations: None | |
| AlignConsecutiveMacros: None | |
| AlignConsecutiveShortCaseStatements: | |
| Enabled: false | |
| AlignConsecutiveTableGenCondOperatorColons: None | |
| AlignConsecutiveTableGenDefinitionColons: None | |
| AlignEscapedNewlines: Right | |
| AlignOperands: DontAlign | |
| AlignTrailingComments: | |
| Kind: Always | |
| OverEmptyLines: 0 | |
| AllowAllArgumentsOnNextLine: false | |
| AllowAllParametersOfDeclarationOnNextLine: false | |
| AllowBreakBeforeNoexceptSpecifier: Never | |
| AllowShortBlocksOnASingleLine: Always | |
| AllowShortCaseExpressionOnASingleLine: true | |
| AllowShortCaseLabelsOnASingleLine: false | |
| AllowShortCompoundRequirementOnASingleLine: true | |
| AllowShortEnumsOnASingleLine: false | |
| AllowShortFunctionsOnASingleLine: None | |
| AllowShortIfStatementsOnASingleLine: Never | |
| AllowShortLambdasOnASingleLine: All | |
| AllowShortLoopsOnASingleLine: false | |
| AlwaysBreakBeforeMultilineStrings: false | |
| BinPackArguments: true | |
| BinPackParameters: true | |
| BitFieldColonSpacing: Both | |
| BraceWrapping: | |
| AfterCaseLabel: false | |
| AfterClass: false | |
| AfterControlStatement: Never | |
| AfterEnum: false | |
| AfterFunction: true | |
| AfterNamespace: false | |
| AfterStruct: false | |
| AfterUnion: false | |
| AfterExternBlock: false | |
| BeforeCatch: false | |
| BeforeElse: false | |
| BeforeLambdaBody: false | |
| BeforeWhile: false | |
| IndentBraces: false | |
| SplitEmptyFunction: true | |
| SplitEmptyRecord: true | |
| SplitEmptyNamespace: true | |
| BreakAdjacentStringLiterals: true | |
| BreakAfterAttributes: Leave | |
| BreakAfterReturnType: Automatic | |
| BreakArrays: true | |
| BreakBeforeBinaryOperators: NonAssignment | |
| BreakBeforeBraces: Custom | |
| BreakBeforeConceptDeclarations: Always | |
| BreakBeforeInlineASMColon: OnlyMultiline | |
| BreakBeforeTernaryOperators: true | |
| BreakConstructorInitializers: BeforeColon | |
| BreakFunctionDefinitionParameters: false | |
| BreakInheritanceList: BeforeColon | |
| BreakStringLiterals: false | |
| BreakTemplateDeclarations: MultiLine | |
| ColumnLimit: 120 | |
| CompactNamespaces: false | |
| ConstructorInitializerIndentWidth: 4 | |
| ContinuationIndentWidth: 4 | |
| Cpp11BracedListStyle: true | |
| DerivePointerAlignment: false | |
| EmptyLineAfterAccessModifier: Never | |
| EmptyLineBeforeAccessModifier: LogicalBlock | |
| ExperimentalAutoDetectBinPacking: false | |
| FixNamespaceComments: false | |
| IncludeBlocks: Preserve | |
| IncludeCategories: | |
| - Regex: ^"(llvm|llvm-c|clang|clang-c)/ | |
| Priority: 2 | |
| SortPriority: 0 | |
| CaseSensitive: false | |
| - Regex: ^(<|"(gtest|gmock|isl|json)/) | |
| Priority: 3 | |
| SortPriority: 0 | |
| CaseSensitive: false | |
| - Regex: .* | |
| Priority: 1 | |
| SortPriority: 0 | |
| CaseSensitive: false | |
| IncludeIsMainRegex: (Test)?$ | |
| IncludeIsMainSourceRegex: "" | |
| IndentAccessModifiers: true | |
| IndentCaseBlocks: false | |
| IndentCaseLabels: true | |
| IndentExternBlock: AfterExternBlock | |
| IndentGotoLabels: true | |
| IndentPPDirectives: BeforeHash | |
| IndentRequiresClause: true | |
| IndentWidth: 4 | |
| IndentWrappedFunctionNames: false | |
| InsertBraces: false | |
| InsertNewlineAtEOF: true | |
| InsertTrailingCommas: None | |
| IntegerLiteralSeparator: | |
| Binary: 0 | |
| BinaryMinDigits: 0 | |
| Decimal: 0 | |
| DecimalMinDigits: 0 | |
| Hex: 0 | |
| HexMinDigits: 0 | |
| KeepEmptyLines: | |
| AtEndOfFile: false | |
| AtStartOfBlock: true | |
| AtStartOfFile: true | |
| LambdaBodyIndentation: Signature | |
| Language: Cpp | |
| LineEnding: DeriveLF | |
| MacroBlockBegin: "" | |
| MacroBlockEnd: "" | |
| MainIncludeChar: Quote | |
| MaxEmptyLinesToKeep: 1 | |
| NamespaceIndentation: All | |
| PPIndentWidth: -1 | |
| PackConstructorInitializers: BinPack | |
| PenaltyBreakAssignment: 2 | |
| PenaltyBreakBeforeFirstCallParameter: 19 | |
| PenaltyBreakComment: 300 | |
| PenaltyBreakFirstLessLess: 120 | |
| PenaltyBreakOpenParenthesis: 0 | |
| PenaltyBreakScopeResolution: 500 | |
| PenaltyBreakString: 1000 | |
| PenaltyBreakTemplateDeclaration: 10 | |
| PenaltyExcessCharacter: 1000000 | |
| PenaltyIndentedWhitespace: 0 | |
| PenaltyReturnTypeOnItsOwnLine: 60 | |
| PointerAlignment: Right | |
| QualifierAlignment: Leave | |
| ReferenceAlignment: Pointer | |
| ReflowComments: false | |
| RemoveParentheses: Leave | |
| RemoveSemicolon: false | |
| RequiresClausePosition: OwnLine | |
| RequiresExpressionIndentation: OuterScope | |
| SeparateDefinitionBlocks: Leave | |
| ShortNamespaceLines: 1 | |
| SkipMacroDefinitionBody: false | |
| SortIncludes: CaseSensitive | |
| SortUsingDeclarations: LexicographicNumeric | |
| SpaceAfterCStyleCast: true | |
| SpaceAfterLogicalNot: false | |
| SpaceAfterTemplateKeyword: false | |
| SpaceAroundPointerQualifiers: Default | |
| SpaceBeforeAssignmentOperators: true | |
| SpaceBeforeCaseColon: false | |
| SpaceBeforeCpp11BracedList: false | |
| SpaceBeforeCtorInitializerColon: true | |
| SpaceBeforeInheritanceColon: true | |
| SpaceBeforeParens: ControlStatements | |
| SpaceBeforeParensOptions: | |
| AfterControlStatements: true | |
| AfterForeachMacros: true | |
| AfterFunctionDeclarationName: false | |
| AfterFunctionDefinitionName: false | |
| AfterIfMacros: true | |
| AfterOverloadedOperator: false | |
| AfterPlacementOperator: true | |
| AfterRequiresInClause: false | |
| AfterRequiresInExpression: false | |
| BeforeNonEmptyParentheses: false | |
| SpaceBeforeRangeBasedForLoopColon: true | |
| SpaceBeforeSquareBrackets: false | |
| SpaceInEmptyBlock: false | |
| SpacesBeforeTrailingComments: 0 | |
| SpacesInAngles: Never | |
| SpacesInContainerLiterals: false | |
| SpacesInLineCommentPrefix: | |
| Minimum: 1 | |
| Maximum: -1 | |
| SpacesInParens: Never | |
| SpacesInSquareBrackets: false | |
| Standard: c++20 | |
| TabWidth: 4 | |
| UseTab: Never | |
| AllowAllConstructorInitializersOnNextLine: false | |
| AlwaysBreakTemplateDeclarations: Yes | |
| KeepEmptyLinesAtTheStartOfBlocks: true | |
| SpaceInEmptyParentheses: false | |
| SpacesInCStyleCastParentheses: false | |
| SpacesInParentheses: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment