Created
September 4, 2024 10:20
-
-
Save mandar1jn/635c0e7deb298b8cd0c52ddf16ed25f4 to your computer and use it in GitHub Desktop.
My personal .clang-format config, created to match UVA requirements
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
| # https://clang.llvm.org/docs/ClangFormatStyleOptions.html | |
| --- | |
| BasedOnStyle: LLVM | |
| AccessModifierOffset: 4 | |
| AlignAfterOpenBracket: DontAlign | |
| AlignArrayOfStructures: Left | |
| AlignConsecutiveAssignments: | |
| Enabled: false | |
| AcrossEmptyLines: false | |
| AcrossComments: false | |
| AlignCompound: false | |
| AlignFunctionPointers: false | |
| PadOperators: false | |
| AlignConsecutiveBitFields: | |
| Enabled: false | |
| AcrossEmptyLines: false | |
| AcrossComments: false | |
| AlignCompound: false | |
| AlignFunctionPointers: false | |
| PadOperators: false | |
| AlignConsecutiveDeclarations: | |
| Enabled: false | |
| AcrossEmptyLines: false | |
| AcrossComments: false | |
| AlignCompound: false | |
| AlignFunctionPointers: false | |
| PadOperators: false | |
| AlignConsecutiveMacros: | |
| Enabled: false | |
| AcrossEmptyLines: false | |
| AcrossComments: false | |
| AlignCompound: false | |
| AlignFunctionPointers: false | |
| PadOperators: false | |
| AlignConsecutiveShortCaseStatements: | |
| Enabled: true | |
| AcrossEmptyLines: true | |
| AcrossComments: true | |
| # AlignCaseArrows: true CLANG-UNKNOWN | |
| AlignCaseColons: false | |
| # AlignConsecutiveTableGenBreakingDAGArgColons: None CLANG-19 | |
| # AlignConsecutiveTableGenCondOperatorColons: None CLANG-19 | |
| # AlignConsecutiveTableGenDefinitionColons: None CLANG-19 | |
| # AlignEscapedNewlines: LeftWithLastLine CLANG-UNKNOWN | |
| AlignOperands: AlignAfterOperator | |
| AlignTrailingComments: | |
| Kind: Always | |
| OverEmptyLines: 1 | |
| AllowAllArgumentsOnNextLine: false | |
| AllowAllParametersOfDeclarationOnNextLine: false | |
| AllowBreakBeforeNoexceptSpecifier: OnlyWithParen | |
| AllowShortBlocksOnASingleLine: Empty | |
| # AllowShortCaseExpressionOnASingleLine: true CLANG-19 | |
| AllowShortCaseLabelsOnASingleLine: true | |
| AllowShortCompoundRequirementOnASingleLine: true | |
| AllowShortEnumsOnASingleLine: true | |
| AllowShortFunctionsOnASingleLine: Empty | |
| AllowShortIfStatementsOnASingleLine: Never | |
| AllowShortLambdasOnASingleLine: Empty | |
| AllowShortLoopsOnASingleLine: true | |
| AlwaysBreakBeforeMultilineStrings: false | |
| AttributeMacros: [] | |
| # BinPackParameters: BinPack CLANG-UNKNOWN | |
| BitFieldColonSpacing: Both | |
| BraceWrapping: | |
| AfterCaseLabel: true | |
| AfterClass: true | |
| AfterControlStatement: Always | |
| AfterEnum: true | |
| AfterFunction: true | |
| AfterNamespace: true | |
| # AfterObjCDeclaration: true | |
| AfterStruct: true | |
| AfterUnion: true | |
| AfterExternBlock: true | |
| BeforeCatch: false | |
| BeforeElse: true | |
| BeforeLambdaBody: false | |
| BeforeWhile: false | |
| IndentBraces: false | |
| SplitEmptyFunction: false | |
| SplitEmptyRecord: false | |
| SplitEmptyNamespace: false | |
| BracedInitializerIndentWidth: 4 | |
| BreakAdjacentStringLiterals: true | |
| BreakAfterAttributes: Always | |
| # BreakAfterJavaFieldAnnotations: true | |
| # BreakAfterReturnType: Automatic CLANG-19 | |
| BreakArrays: false | |
| BreakBeforeBinaryOperators: NonAssignment | |
| BreakBeforeBraces: Custom | |
| # BreakBeforeConceptDeclarations: Allowed | |
| # BreakBeforeInlineASMColon: Always | |
| BreakBeforeTernaryOperators: false | |
| # BreakBinaryOperations: RespectPrecedence CLANG-20 | |
| BreakConstructorInitializers: AfterColon | |
| # BreakFunctionDefinitionParameters: false CLANG-19 | |
| BreakInheritanceList: AfterColon | |
| BreakStringLiterals: false | |
| # BreakTemplateDeclarations: No CLANG-19 | |
| ColumnLimit: 100 | |
| # CommentPragmas: '' | |
| CompactNamespaces: false | |
| # ConstructorInitializerIndentWidth: 4 | |
| ContinuationIndentWidth: 4 | |
| Cpp11BracedListStyle: false | |
| DerivePointerAlignment: false | |
| # DisableFormat: false | |
| EmptyLineAfterAccessModifier: Never | |
| EmptyLineBeforeAccessModifier: LogicalBlock | |
| # ExperimentalAutoDetectBinPacking: false | |
| FixNamespaceComments: false | |
| ForEachMacros: [] | |
| IfMacros: [] | |
| IncludeBlocks: Merge | |
| # IncludeCategories: OBJECTS | |
| # IncludeIsMainRegex: '' | |
| # IncludeIsMainSourceRegex: '' | |
| IndentAccessModifiers: true | |
| IndentCaseBlocks: false | |
| IndentCaseLabels: true | |
| IndentExternBlock: NoIndent | |
| IndentGotoLabels: false | |
| IndentPPDirectives: None | |
| IndentRequiresClause: true | |
| IndentWidth: 4 | |
| IndentWrappedFunctionNames: true | |
| InsertBraces: true | |
| InsertNewlineAtEOF: true | |
| # InsertTrailingCommas: None | |
| # IntegerLiteralSeparator: OBJECT | |
| JavaImportGroups: [] | |
| # JavaScriptQuotes: Double | |
| # JavaScriptWrapImports: true | |
| # KeepEmptyLines: CLANG-19 | |
| # AtEndOfFile: false | |
| # AtStartOfBlock: false | |
| # AtStartOfFile: false | |
| LambdaBodyIndentation: OuterScope | |
| Language: Cpp | |
| LineEnding: LF | |
| # MacroBlockBegin: '' | |
| # MacroBlockEnd: '' | |
| # Macros: OBJECTS | |
| # MainIncludeChar: Any CLANG-19 | |
| MaxEmptyLinesToKeep: 1 | |
| NamespaceIndentation: All | |
| NamespaceMacros: [] | |
| # ObjCBinPackProtocolList: Auto | |
| # ObjCBlockIndentWidth: 4 | |
| # ObjCBreakBeforeNestedBlockParam: true | |
| ObjCPropertyAttributeOrder: [] | |
| # ObjCSpaceAfterProperty: false | |
| # ObjCSpaceBeforeProtocolList: false | |
| PPIndentWidth: -1 | |
| PackConstructorInitializers: CurrentLine | |
| # PenaltyBreakAssignment: NUMBER | |
| # PenaltyBreakBeforeFirstCallParameter: NUMBER | |
| # PenaltyBreakComment: NUMBER | |
| # PenaltyBreakFirstLessLess: NUMBER | |
| # PenaltyBreakOpenParenthesis: NUMBER | |
| # PenaltyBreakScopeResolution: NUMBER | |
| # PenaltyBreakString: NUMBER | |
| # PenaltyBreakTemplateDeclaration: NUMBER | |
| # PenaltyExcessCharacter: NUMBER | |
| # PenaltyIndentedWhitespace: NUMBER | |
| # PenaltyReturnTypeOnItsOwnLine: NUMBER | |
| PointerAlignment: Left | |
| QualifierAlignment: Left | |
| # QualifierOrder: [] CLANG-TODO | |
| # RawStringFormats: OBJECTS | |
| ReferenceAlignment: Pointer | |
| ReflowComments: true | |
| RemoveBracesLLVM: false | |
| RemoveParentheses: Leave | |
| RemoveSemicolon: true | |
| # RequiresClausePosition: OwnLine | |
| # RequiresExpressionIndentation: OuterScope | |
| SeparateDefinitionBlocks: Always | |
| # ShortNamespaceLines: 2 | |
| SkipMacroDefinitionBody: false | |
| SortIncludes: CaseInsensitive | |
| # SortJavaStaticImport: After | |
| SortUsingDeclarations: LexicographicNumeric | |
| SpaceAfterCStyleCast: false | |
| SpaceAfterLogicalNot: false | |
| SpaceAfterTemplateKeyword: false | |
| SpaceAroundPointerQualifiers: Default | |
| SpaceBeforeAssignmentOperators: true | |
| SpaceBeforeCaseColon: false | |
| SpaceBeforeCpp11BracedList: true | |
| SpaceBeforeCtorInitializerColon: true | |
| SpaceBeforeInheritanceColon: true | |
| SpaceBeforeJsonColon: false | |
| SpaceBeforeParens: Custom | |
| SpaceBeforeParensOptions: | |
| AfterControlStatements: true | |
| AfterForeachMacros: false | |
| AfterFunctionDeclarationName: false | |
| AfterFunctionDefinitionName: false | |
| AfterIfMacros: true | |
| AfterOverloadedOperator: true | |
| AfterPlacementOperator: true | |
| AfterRequiresInClause: false | |
| AfterRequiresInExpression: false | |
| BeforeNonEmptyParentheses: false | |
| SpaceBeforeRangeBasedForLoopColon: true | |
| SpaceBeforeSquareBrackets: false | |
| SpaceInEmptyBlock: false | |
| SpacesBeforeTrailingComments: 3 | |
| SpacesInAngles: Never | |
| SpacesInContainerLiterals: false | |
| SpacesInLineCommentPrefix: | |
| Minimum: 1 | |
| Maximum: -1 | |
| SpacesInParens: Never | |
| # SpacesInParensOptions: OBJECT | |
| SpacesInSquareBrackets: false | |
| Standard: Auto | |
| # StatementAttributeLikeMacros: [] | |
| # StatementMacros: [] | |
| TabWidth: 4 | |
| # TableGenBreakInsideDAGArg: BreakElements CLANG-19 | |
| # TableGenBreakingDAGArgOperators: [] CLANG-19 | |
| # TypeNames: [] | |
| # TypenameMacros: [] | |
| UseTab: Never | |
| VerilogBreakBetweenInstancePorts: true | |
| # WhitespaceSensitiveMacros: [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment