-
Notifications
You must be signed in to change notification settings - Fork 23
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 files * format header anc cpp files * make intended clang format mistake * fix clang mistake
- Loading branch information
1 parent
2a5568f
commit 3aa4627
Showing
25 changed files
with
2,693 additions
and
2,478 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,28 @@ | ||
--- | ||
BasedOnStyle: Microsoft | ||
AccessModifierOffset: '-1' | ||
AlignAfterOpenBracket: Align | ||
AllowShortFunctionsOnASingleLine: Inline | ||
AllowShortIfStatementsOnASingleLine: Never | ||
AllowShortLambdasOnASingleLine: Inline | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakTemplateDeclarations: 'Yes' | ||
BreakBeforeBinaryOperators: None | ||
BreakBeforeBraces: Custom | ||
BreakConstructorInitializers: BeforeColon | ||
BreakInheritanceList: BeforeColon | ||
ColumnLimit: '80' | ||
ContinuationIndentWidth: '4' | ||
IncludeBlocks: Preserve | ||
IndentPPDirectives: None | ||
IndentWidth: '2' | ||
Language: Cpp | ||
MaxEmptyLinesToKeep: '1' | ||
NamespaceIndentation: None | ||
PointerAlignment: Left | ||
SpaceBeforeParens: ControlStatements | ||
SpacesBeforeTrailingComments: '2' | ||
TabWidth: '4' | ||
UseTab: Never | ||
|
||
... |
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,22 @@ | ||
name: clang-format Check | ||
on: [push, pull_request] | ||
jobs: | ||
formatting-check: | ||
name: Formatting Check | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
path: | ||
- check: 'src' | ||
exclude: 'third_party' # Exclude file paths containing "hello" or "world" | ||
- check: 'tests' | ||
exclude: '' # Nothing to exclude | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run clang-format style check for C/C++/Protobuf programs. | ||
uses: jidicula/[email protected] | ||
with: | ||
clang-format-version: '13' | ||
check-path: ${{ matrix.path['check'] }} | ||
exclude-regex: ${{ matrix.path['exclude'] }} | ||
fallback-style: 'Microsoft' # optional |
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,8 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.formatOnType": true, | ||
"clang-format.executable": "${workspaceFolder}/.clang-format", | ||
"clang-format.style": "file", | ||
"clang-format.fallbackStyle": "Google", | ||
"clang-format.language.cpp.enable": true, | ||
} |
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.