mirror of
https://github.com/jlengrand/error-prone-support.git
synced 2026-03-10 00:01:20 +00:00
While there, tweak the usage message of both `apply-error-prone-suggestions.sh` and `run-mutation-tests.sh`.
27 lines
616 B
Bash
Executable File
27 lines
616 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Compiles the code using Error Prone and applies its suggestions. The set of
|
|
# checks applied can optionally be restricted by name.
|
|
#
|
|
# As this script may modify the project's code, it is important to execute it
|
|
# in a clean Git working directory.
|
|
|
|
set -e -u -o pipefail
|
|
|
|
if [ "${#}" -gt 1 ]; then
|
|
echo "Usage: ${0} [PatchChecks]"
|
|
exit 1
|
|
fi
|
|
|
|
patchChecks=${1:-}
|
|
|
|
mvn clean test-compile fmt:format \
|
|
-s "$(dirname "${0}")/settings.xml" \
|
|
-T 1.0C \
|
|
-Perror-prone \
|
|
-Perror-prone-fork \
|
|
-Ppatch \
|
|
-Pself-check \
|
|
-Derror-prone.patch-checks="${patchChecks}" \
|
|
-Dverification.skip
|