Commit 17f57352 authored by Christoph Groth's avatar Christoph Groth

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
Pipeline #1951 passed with stages
in 3 minutes and 39 seconds
......@@ -36,8 +36,7 @@ build package:
check whitespace style:
stage: build
script:
- "! 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"
script: ./check_whitespace
allow_failure: true
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment