Skip to content
Snippets Groups Projects
Commit 17f57352 authored by Christoph Groth's avatar Christoph Groth
Browse files

CI: move whitespace check to external script

Without this measure, a failed check is no longer detected.  This seems
to be a bug in gitlab CI.
parent 39f91982
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -36,8 +36,7 @@ build package: ...@@ -36,8 +36,7 @@ build package:
check whitespace style: check whitespace style:
stage: build stage: build
script: script: ./check_whitespace
- "! for f in `git ls-files | grep -v \\.diff$`; do file $f | grep -q ' text' || continue; grep -q '[[:blank:]]$' $f && echo $f: trailing whitespace; tail -n1 $f | read -r _ || echo $f: no newline at end of file; tail -n1 $f | grep -q '^$' && echo $f: empty line at end of file; done | grep . >&2"
allow_failure: true allow_failure: true
check for dependencies installed: check for dependencies installed:
......
#!/bin/sh
! for f in $(git ls-files | grep -v \\.diff$); do
file $f | grep -q ' text' || continue
grep -q '[[:blank:]]$' $f && echo $f: trailing whitespace
tail -n1 $f | read -r _ || echo $f: no newline at end of file
tail -n1 $f | grep -q '^$' && echo $f: empty line at end of file
done | grep . >&2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment