forked from valkey-io/valkey
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add clang-format configs (valkey-io#323)
I have validated that these settings closely match the existing coding style with one major exception on `BreakBeforeBraces`, which will be `Attach` going forward. The mixed `BreakBeforeBraces` styles in the current codebase are hard to imitate and also very odd IMHO - see below ``` if (a == 1) { /*Attach */ } ``` ``` if (a == 1 || b == 2) { /* Why? */ } ``` Please do NOT merge just yet. Will add the github action next once the style is reviewed/approved. --------- Signed-off-by: Ping Xie <pingxie@google.com>
- Loading branch information
Showing
135 changed files
with
24,845 additions
and
27,231 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
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 | ||
AllowAllParametersOfDeclarationOnNextLine: false | ||
BinPackParameters: false | ||
AlignAfterOpenBracket: Align |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.