-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve clang-format check to reduce false positives (#715)
- Change the clang-format github runner to check only the git diff delta changed lines made by the current PR. - Update our clang format to the newest version, and updates the style file to a modern group of settings which results in a very similar result to the existing combination of version /settings. - Change the clang-format github runner to compare the current branch head to the "merge base", or common ancestor with main head, removing divergent files since last rebase with main. - Update github runner to newest version of ubuntu from 20.04. Signed-off-by: Dan Hoeflinger <[email protected]>
- Loading branch information
1 parent
d06ef9a
commit 00153d5
Showing
2 changed files
with
36 additions
and
13 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 |
---|---|---|
@@ -1,20 +1,37 @@ | ||
BasedOnStyle: LLVM | ||
|
||
Language: Cpp | ||
Standard: Cpp11 | ||
Standard: c++17 | ||
|
||
IndentWidth: 4 | ||
ColumnLimit: 120 | ||
|
||
AllowShortIfStatementsOnASingleLine: false | ||
AlwaysBreakTemplateDeclarations: true | ||
AlwaysBreakAfterReturnType: All | ||
PointerAlignment: Left | ||
AllowShortIfStatementsOnASingleLine: false | ||
BreakBeforeBraces: Allman | ||
|
||
# Disable formatting options which may break tests. | ||
SortIncludes: false | ||
ReflowComments: false | ||
BraceWrapping: | ||
AfterClass: true | ||
AfterControlStatement: Always | ||
AfterEnum: true | ||
AfterExternBlock: true | ||
AfterFunction: true | ||
AfterNamespace: true | ||
AfterObjCDeclaration: true | ||
AfterStruct: true | ||
AfterUnion: true | ||
BeforeCatch: true | ||
BeforeElse: true | ||
BeforeLambdaBody: false | ||
BeforeWhile: false | ||
IndentBraces: false | ||
SplitEmptyFunction: true | ||
SplitEmptyNamespace: true | ||
SplitEmptyRecord: true | ||
|
||
BreakBeforeBraces: Custom | ||
# Indent preprocessor directives | ||
IndentPPDirectives: AfterHash | ||
|
||
PointerAlignment: Left | ||
# Disable formatting options which may break tests. | ||
ReflowComments: false | ||
SortIncludes: false |
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