-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable consistent clang format for the project (#122)
* Enable consistent clang format for the project 1. Add a .clang-format which is basically 2 spaces, allman braces, embedded namespaces. 2. Reformat the entire codebase with find src -iname "*.cpp" -o -iname "*.h" -o -iname "*.mm" | xargs clang-format -i 3. add a cmake code checks target which currently just checkes that the code remains clang formatted 4. Add a github action which runs that code check target on ubuntu on a PR
- Loading branch information
Showing
30 changed files
with
3,308 additions
and
3,225 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,36 @@ | ||
--- | ||
UseTab: Never | ||
--- | ||
Language: Cpp | ||
AlignAfterOpenBracket: BAS_Align | ||
ConstructorInitializerIndentWidth: 2 | ||
SpaceBeforeParens: ControlStatements | ||
ColumnLimit: 105 | ||
BasedOnStyle: Google | ||
IndentWidth: 2 | ||
AlignAfterOpenBracket: Align | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
BreakConstructorInitializers: BeforeComma | ||
BreakBeforeBraces: Allman | ||
ColumnLimit: 105 | ||
SortIncludes: false | ||
NamespaceIndentation: None | ||
ReflowComments: false | ||
AllowShortFunctionsOnASingleLine: None | ||
--- | ||
Language: ObjC | ||
BasedOnStyle: Google | ||
AlignAfterOpenBracket: BAS_Align | ||
ConstructorInitializerIndentWidth: 2 | ||
SpaceBeforeParens: ControlStatements | ||
IndentWidth: 2 | ||
AlignAfterOpenBracket: Align | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
BreakConstructorInitializers: BeforeComma | ||
BreakBeforeBraces: Allman | ||
ColumnLimit: 105 | ||
SortIncludes: false | ||
NamespaceIndentation: None | ||
ReflowComments: false | ||
AllowShortFunctionsOnASingleLine: None | ||
... |
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,21 @@ | ||
name: Clap Wrapper Format and Code Checks | ||
on: [pull_request] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build-code-checks: | ||
name: code-checks | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Run Code Checks | ||
run: | | ||
cmake -Bbuild -DCLAP_WRAPPER_CODE_CHECKS_ONLY=TRUE | ||
cmake --build build --target clap-wrapper-code-checks |
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.