diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..89f40ab --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,17 @@ +name: clang-format Check +on: [push, pull_request] +jobs: + formatting-check: + name: Formatting Check + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + fail-fast: true + steps: + - uses: actions/checkout@v4 + - name: Run clang-format style check for C/C++/Protobuf programs. + uses: jidicula/clang-format-action@v4.15.0 + with: + clang-format-version: "19" # latest on Archlinux as of committing + check-path: "sources" diff --git a/sources/CONTRIBUTION.md b/sources/CONTRIBUTION.md index 73f867e..1ca47fa 100644 --- a/sources/CONTRIBUTION.md +++ b/sources/CONTRIBUTION.md @@ -1,4 +1,6 @@ # Contribution Guide -It is suggested for the new contributors to use the following tools: -- `clang-format` for all the C files, source and headers. +This project enforces (see [workflows](../.github/workflows/)) the following +formatters: +- `clang-format` version 19 for all the C files, source and headers (or any + protobuf if any, in the future).