From fc8962da2d496762300a62b2d236be9429c847d4 Mon Sep 17 00:00:00 2001 From: Ping Xie Date: Mon, 13 May 2024 07:14:56 -0700 Subject: [PATCH] Add .clang-format Signed-off-by: Ping Xie --- src/.clang-format | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/.clang-format diff --git a/src/.clang-format b/src/.clang-format new file mode 100644 index 0000000000..92644e1aa1 --- /dev/null +++ b/src/.clang-format @@ -0,0 +1,29 @@ +BasedOnStyle: LLVM +IndentWidth: 4 +TabWidth: 4 +UseTab: Never +ColumnLimit: 120 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakString: 100 +PenaltyExcessCharacter: 100 +MaxEmptyLinesToKeep: 2 +BreakBeforeBraces: Attach +AllowShortCaseLabelsOnASingleLine: true +AllowShortIfStatementsOnASingleLine: WithoutElse +AllowShortLoopsOnASingleLine: true +AllowShortFunctionsOnASingleLine: false +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignTrailingComments: true +PointerAlignment: Right +KeepEmptyLinesAtTheStartOfBlocks: false +SpaceBeforeParens: ControlStatements +SpacesInParentheses: false +SpacesInAngles: false +SpacesInCStyleCastParentheses: false +SpaceAfterCStyleCast: false +SpacesInSquareBrackets: false +ReflowComments: true +CommentPragmas: '^\\s*\\*' +SortIncludes: false