Skip to content

Commit

Permalink
Changes how the check for formatting is done.
Browse files Browse the repository at this point in the history
Now the CI job uses the --check flag provided by cmake_format instead of
the `git diff` check, because git caused some problems in this repo.
  • Loading branch information
keroe committed Sep 13, 2022
1 parent 643d219 commit 596e62e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ cmake_format:
before_script: []
script:
- sudo apt update && sudo apt install -y python3-pip && pip3 install --user cmake_format pyyaml
- env PATH=~/.local/bin:$PATH find . -name "*.cmake" -exec cmake-format -i {} +
- git diff --exit-code || (echo "CMake formatting issues found. Please fix them first!"; $(exit 1))
- env PATH=~/.local/bin:$PATH find . -name "*.cmake" -exec cmake-format --check {} + || (echo "CMake formatting issues found. Please fix them first!"; $(exit 1))

deps:
script:
Expand Down

0 comments on commit 596e62e

Please sign in to comment.