diff --git a/.clang-format b/.clang-format deleted file mode 100644 index 01728a6..0000000 --- a/.clang-format +++ /dev/null @@ -1,18 +0,0 @@ ---- -BasedOnStyle: WebKit -AlignAfterOpenBracket: Align -AlignConsecutiveMacros: 'true' -AlignConsecutiveAssignments: 'true' -AlignOperands: 'true' -AlignTrailingComments: 'true' -AllowShortBlocksOnASingleLine: 'false' -AllowShortFunctionsOnASingleLine: InlineOnly -AllowShortLoopsOnASingleLine: 'false' -ColumnLimit: '100' -IndentWidth: '4' -SpaceAfterLogicalNot: 'false' -SpaceBeforeAssignmentOperators: 'true' -SpaceBeforeRangeBasedForLoopColon: 'true' -TabWidth: '4' -UseTab: Always ---- diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 7f0a4dc..5ee76bb 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -8,7 +8,7 @@ jobs: timeout-minutes: 10 steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive @@ -17,4 +17,4 @@ jobs: if ! make; then echo "The application has failed to build." exit 1 # This will cause the workflow to fail - fi + fi \ No newline at end of file diff --git a/.github/workflows/format-check.yml b/.github/workflows/format-check.yml new file mode 100644 index 0000000..80a4090 --- /dev/null +++ b/.github/workflows/format-check.yml @@ -0,0 +1,20 @@ +name: Code Style Check + +on: [push] + +jobs: + formatting-check: + name: Check format of C + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Run clang-format style check for C/C++ sources + uses: Northeastern-Electric-Racing/clang-format-action@main + with: + clang-format-version: '18' + # only check core, embedded base covered internally + check-path: "Core/" + # use the clang-format from embedded base + format-filepath: "./Drivers/Embedded-Base/clang-format" \ No newline at end of file diff --git a/Core/.clang-format-ignore b/Core/.clang-format-ignore new file mode 100644 index 0000000..06026d5 --- /dev/null +++ b/Core/.clang-format-ignore @@ -0,0 +1,6 @@ +./*/stm32* +./*/sys* +./*/FreeRTOS* +./*/freertos* +./*/main* +./Startup/* \ No newline at end of file diff --git a/Drivers/Embedded-Base b/Drivers/Embedded-Base index ff34106..fdfdca7 160000 --- a/Drivers/Embedded-Base +++ b/Drivers/Embedded-Base @@ -1 +1 @@ -Subproject commit ff34106b18e296434fc817d7a9c66efc28c07abe +Subproject commit fdfdca783209c293807b1e71efc5447d754050eb