Skip to content

Commit 8f19e82

Browse files
jltoblergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9bef980 commit 8f19e82

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.gitlab-ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,12 @@ static-analysis:
102102
script:
103103
- ./ci/run-static-analysis.sh
104104
- ./ci/check-directional-formatting.bash
105+
106+
check-whitespace:
107+
image: ubuntu:latest
108+
before_script:
109+
- ./ci/install-dependencies.sh
110+
script:
111+
- ./ci/check-whitespace.sh "$CI_MERGE_REQUEST_TARGET_BRANCH_SHA"
112+
rules:
113+
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'

0 commit comments

Comments
 (0)