diff --git a/.clang-format b/.clang-format index d27f3c4d..a7026a8d 100644 --- a/.clang-format +++ b/.clang-format @@ -1,8 +1,7 @@ -# minimum required clang-format version: 12 -#--- +--- BasedOnStyle: LLVM IndentWidth: 4 -#--- +--- Language: Cpp BasedOnStyle: LLVM IndentWidth: 4 @@ -29,4 +28,32 @@ BraceWrapping: SplitEmptyNamespace: true ColumnLimit: 100 SortIncludes: false -#--- \ No newline at end of file +--- +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 +--- + diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml new file mode 100644 index 00000000..b0f055f2 --- /dev/null +++ b/.github/workflows/code-checks.yml @@ -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/clang-format-action@v4.11.0 + with: + clang-format-version: '17' + check-path: ${{ matrix.path }} \ No newline at end of file