Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/check-format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install clang-format==15.0.7 cmake_format

- name: Run clang-format style check
uses: jidicula/clang-format-action@v4.11.0
with:
clang-format-version: "15"
run: |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is inconsistency: cmake format does python -m pip install --upgrade pip where clang format doesn't. Probably we need to add step: "Install dependencies" where we will do:

python -m pip install --upgrade pip
pip install clang-format==15.0.7
pip install cmake_format

and then perform clang and cmake check?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

find . -not -path '*/build/*' \( -name '*.cpp' -or -name '*.hpp' -or -name '*.c' -or -name '*.h' \) \
-exec clang-format --dry-run --Werror {} +

- name: Run cmake-format style check
run: |
python -m pip install --upgrade pip
pip install cmake_format
find . \( \( -not -path '*/build/*' \) -name '*.cmake' -or -name 'CMakeLists.txt' \) \
-exec cmake-format --check {} +;

Expand Down
Loading