Skip to content

Commit

Permalink
gitlab-ci: add whitespace error check
Browse files Browse the repository at this point in the history
GitLab CI does not have a job to check for whitespace errors introduced
by a set of changes. Reuse the existing generic `whitespace-check.sh` to
create the job for GitLab pipelines.

Note that the `$CI_MERGE_REQUEST_TARGET_BRANCH_SHA` variable is only
available in GitLab merge request pipelines and therefore the CI job is
configured to only run as part of those pipelines.

Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
jltobler authored and gitster committed May 3, 2024
1 parent 9bef980 commit 8f19e82
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,12 @@ static-analysis:
script:
- ./ci/run-static-analysis.sh
- ./ci/check-directional-formatting.bash

check-whitespace:
image: ubuntu:latest
before_script:
- ./ci/install-dependencies.sh
script:
- ./ci/check-whitespace.sh "$CI_MERGE_REQUEST_TARGET_BRANCH_SHA"
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'

0 comments on commit 8f19e82

Please sign in to comment.