diff options
author | Justin Tobler <jltobler@gmail.com> | 2024-05-03 12:21:07 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-05-03 12:11:49 -0700 |
commit | 8f19e82c5b313a1518119cc4b31c32ec3001b967 (patch) | |
tree | 0287130f1124305fc0dfd5775616bd05f1ef01c3 | |
parent | 9bef98096c1a58ec0f0e793a282374b50a43eaab (diff) | |
download | git-8f19e82c5b313a1518119cc4b31c32ec3001b967.tar.gz |
gitlab-ci: add whitespace error check
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>
-rw-r--r-- | .gitlab-ci.yml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c0fa2fe90b..619bf729fa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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' |