CI: show white spaces and line ending in lint diff

This commit is contained in:
linsui 2024-09-19 17:52:27 +08:00 committed by Licaon_Kter
parent 85d8641580
commit 9b78630b1c

View file

@ -144,14 +144,14 @@ fdroid lint:
- function set_error() { export EXITVALUE=1; printf "\x1b[31mERROR `history|tail -2|head -1|cut -b 6-500`\x1b[0m\n"; }
- |
if [ -n "$CHANGED" ]; then
fdroid lint -f $CHANGED || {
set_error;
printf "\nThese files have lint issues:\n";
fdroid rewritemeta -l $CHANGED;
printf "\nThese are the formatting issues:\n";
fdroid rewritemeta $CHANGED;
git --no-pager diff --color=always;
}
fdroid rewritemeta $CHANGED;
git diff --exit-code > /dev/null || {
set_error;
printf "\nThese files have lint issues:\n";
git diff --name-only;
printf "\nThese are the formatting issues:\n";
printf "$(git --no-pager diff --color=always --ws-error-highlight=all | sed 's/\r/^M/')";
}
fi
- exit $EXITVALUE