1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-11-15 22:34:54 +00:00
CC-Tweaked/config/pre-commit/illuaminate-lint.sh
Jonathan Coates 953b94fd08 Add problem matchers for Github actions
- Add a basic problem matcher for illuaminate errors.
 - Add a script (tools/parse-reports.py) which parses the XML reports
   generated by checkstyle and junit, extracts source locations, and
   emits them in a manner which can be consumed by another set of
   matchers.

This should make it a little easier to see problems for folks who just
rely on CI to test things (though also, please don't do this if you can
help it).
2021-05-17 16:31:58 +00:00

17 lines
523 B
Bash
Executable File

#!/usr/bin/env sh
set -e
test -d bin || mkdir bin
test -f bin/illuaminate || curl -s -obin/illuaminate https://squiddev.cc/illuaminate/linux-x86-64/illuaminate
chmod +x bin/illuaminate
if [ -n ${GITHUB_ACTIONS+x} ]; then
# Register a problem matcher (see https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md)
# for illuaminate.
echo "::add-matcher::.github/matchers/illuaminate.json"
trap 'echo "::remove-matcher owner=illuaminate::"' EXIT
fi
./gradlew luaJavadoc
bin/illuaminate lint