From d95c76f87b6357f11e6fd92af698472c61e2276e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tanguy=20=E2=A7=93=20Herrmann?= Date: Tue, 19 Apr 2022 19:00:55 +0200 Subject: [PATCH] ci: add lint error header in log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tanguy ⧓ Herrmann --- ci/cue/lint.cue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/cue/lint.cue b/ci/cue/lint.cue index 5f2ac1a1..d59c4405 100644 --- a/ci/cue/lint.cue +++ b/ci/cue/lint.cue @@ -50,7 +50,8 @@ import ( git status find . -name '*.cue' -not -path '*/cue.mod/*' -print | time xargs -t -n 1 -P 8 cue fmt -s - test -z "$(git status -s . | grep -e "^ M" | grep "\.cue" | cut -d ' ' -f3 | tee /dev/stderr)" + modified="$(git status -s . | grep -e "^ M" | grep "\.cue" | cut -d ' ' -f3 || true)" + test -z "$modified" || (echo -e "linting error in:\n${modified}" > /dev/stderr ; false) """# }, ]