-
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
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
31 changed files
with
2,247 additions
and
2,464 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,19 @@ | ||
--- | ||
UseTab: Never | ||
--- | ||
Language: Cpp | ||
IndentWidth: 2 | ||
AlignAfterOpenBracket: Align | ||
BreakBeforeBraces: Allman | ||
ColumnLimit: 120 | ||
SortIncludes: false | ||
NamespaceIndentation: All | ||
--- | ||
Language: ObjC | ||
IndentWidth: 2 | ||
AlignAfterOpenBracket: Align | ||
BreakBeforeBraces: Allman | ||
ColumnLimit: 120 | ||
SortIncludes: false | ||
NamespaceIndentation: All | ||
... |
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.