From 75cc81bc925e5cb4c0efd519a5ec2dcd92c8af68 Mon Sep 17 00:00:00 2001 From: RobotLeopard86 Date: Tue, 10 Sep 2024 16:36:00 -0700 Subject: [PATCH] Add clang-format for people who like it --- .clang-format | 63 ++++++++++++++++++++++++++++++++++++++++++++ .clang-format-ignore | 15 +++++++++++ 2 files changed, 78 insertions(+) create mode 100644 .clang-format create mode 100644 .clang-format-ignore diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..165f193 --- /dev/null +++ b/.clang-format @@ -0,0 +1,63 @@ +--- +Language: Java +AccessModifierOffset: -2 +AlignAfterOpenBracket: false +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignEscapedNewlines: Left +AlignOperands: true +AlignTrailingComments: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: true +AllowShortCaseLabelsOnASingleLine: true +AllowShortFunctionsOnASingleLine: Empty +AllowShortIfStatementsOnASingleLine: WithoutElse +AllowShortLoopsOnASingleLine: true +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +BinPackArguments: true +BinPackParameters: true +BraceWrapping: + AfterClass: true + AfterControlStatement: true + AfterEnum: true + AfterFunction: true + BeforeCatch: true + BeforeElse: true + IndentBraces: false +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Attach +BreakBeforeTernaryOperators: false +BreakConstructorInitializersBeforeComma: false +BreakConstructorInitializers: BeforeColon +BreakAfterJavaFieldAnnotations: true # Specific to Java +BreakStringLiterals: true +CommentPragmas: '' +ConstructorInitializerAllOnOneLineOrOnePerLine: true +ConstructorInitializerIndentWidth: 2 +ContinuationIndentWidth: 4 +DisableFormat: false +ExperimentalAutoDetectBinPacking: false +IndentCaseLabels: true +IndentWidth: 4 +IndentWrappedFunctionNames: false +KeepEmptyLinesAtTheStartOfBlocks: true +MaxEmptyLinesToKeep: 3 +PenaltyBreakAssignment: 2 +PenaltyBreakBeforeFirstCallParameter: 19 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakString: 1000 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 60 +ReflowComments: true +SortIncludes: false # Java handles imports automatically +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: false +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 0 +SpacesInContainerLiterals: true +SpacesInParentheses: false +SpacesInSquareBrackets: false +TabWidth: 4 +UseTab: Always diff --git a/.clang-format-ignore b/.clang-format-ignore new file mode 100644 index 0000000..4a91448 --- /dev/null +++ b/.clang-format-ignore @@ -0,0 +1,15 @@ +build +AdvantageScopeAssets +gradle +.pathplanner +.vscode +.wpilib +.github +.gradle +*.md +*.chor +gradlew* +*.json +*.gradle +.gitignore +vendordeps \ No newline at end of file