vp-build/common/travis/xlint.sh
0x5c cc27e8e6f7 common/travis/xlint.sh: print Github annotations
Turns xlint, version lint, and commit lint messages into warning or error
annotaions. All are printed with special highlighting in the action log and
summary. Xlint and version lint annotations are shown inline in the changes tab
and commit view. Annotations without line number are shown at line 1.
2022-05-05 21:34:11 +02:00

19 lines
487 B
Bash
Executable File

#!/bin/sh
#
# xlint.sh
[ "$XLINT" ] || exit 0
EXITCODE=0
read base tip < /tmp/revisions
common/scripts/lint-commits $base $tip || EXITCODE=$?
for t in $(awk '{ print "srcpkgs/" $0 "/template" }' /tmp/templates); do
/bin/echo -e "\x1b[32mLinting $t...\x1b[0m"
xlint "$t" > /tmp/xlint_out || EXITCODE=$?
common/scripts/lint-version-change "$t" $base $tip > /tmp/vlint_out || EXITCODE=$?
awk -f common/scripts/lint2annotations.awk /tmp/xlint_out /tmp/vlint_out
done
exit $EXITCODE