From 92b09c7ef794a48b8f650fc13b8e395a06bb2e39 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 26 Jan 2017 14:28:00 +0100 Subject: [PATCH] gitlab-ci: show diff when there are lint failures Oftentimes, the lint failures are just simple whitespace issues. Many people submitting metadata do not really know much about the fdroid tools, so they have to look up or ask what rewritemeta is. This just shows a diff after running rewritemeta so it should be clearer what the issue is. --- .gitlab-ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 77cd47b354..fa0b2ae6be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,4 +8,13 @@ before_script: lint: script: - - fdroid lint -f + - export EXITVALUE=0 + - fdroid lint -f || { + export EXITVALUE=1; + printf "\nThese files have lint issues:\n"; + fdroid rewritemeta -l; + printf "\nThese are the formatting issues:\n"; + fdroid rewritemeta; + git --no-pager diff --color=always; + } + - exit $EXITVALUE