Skip to content

Commit

Permalink
CLangFormat step in PR
Browse files Browse the repository at this point in the history
The code needs to be formatted, but do that at the end of this journey to keep the log clean.
  • Loading branch information
baconpaul authored Jul 27, 2024
1 parent 0c9e69f commit 30eb0bb
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
35 changes: 31 additions & 4 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# minimum required clang-format version: 12
#---
---
BasedOnStyle: LLVM
IndentWidth: 4
#---
---
Language: Cpp
BasedOnStyle: LLVM
IndentWidth: 4
Expand All @@ -29,4 +28,32 @@ BraceWrapping:
SplitEmptyNamespace: true
ColumnLimit: 100
SortIncludes: false
#---
---
Language: ObjC
BasedOnStyle: LLVM
IndentWidth: 4
AlignAfterOpenBracket: Align
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
ColumnLimit: 100
SortIncludes: false
---

18 changes: 18 additions & 0 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Format Check
on: [pull_request]
jobs:
formatting-check:
name: Clang Format Check
runs-on: ubuntu-latest
strategy:
matrix:
path:
- 'src'
# - 'include'
steps:
- uses: actions/checkout@v3
- name: Run clang-format style check
uses: jidicula/[email protected]
with:
clang-format-version: '17'
check-path: ${{ matrix.path }}

0 comments on commit 30eb0bb

Please sign in to comment.