diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..1e62ea11 --- /dev/null +++ b/.clang-format @@ -0,0 +1,7 @@ +--- +BasedOnStyle: Chromium +IndentWidth: '2' +TabWidth: '2' +UseTab: Always + +... diff --git a/.github/workflows/check_formatting.yml b/.github/workflows/check_formatting.yml new file mode 100644 index 00000000..6a891d6c --- /dev/null +++ b/.github/workflows/check_formatting.yml @@ -0,0 +1,18 @@ +name: Check formatting + +on: #[push, pull_request] To be enabled once formatting is fixed in repo + workflow_dispatch: + +jobs: + check_date: + runs-on: ubuntu-latest + name: Check formatting + steps: + - uses: actions/checkout@v2 + - name: print latest_commit + run: echo ${{ github.sha }} + - name: clang-format Check + uses: jidicula/clang-format-action@v4.11.0 + with: + check-path: "firmware" + fallback-style: Chromium