Execute cliargs script before running tests

This commit is contained in:
Erik C. Thauvin 2024-05-28 14:01:45 -07:00
parent 7aa0319d4d
commit aa6d6a70b0
Signed by: erik
GPG key ID: 776702A6A2DA330E
6 changed files with 31 additions and 21 deletions

16
scripts/checkcliargs.sh Executable file
View file

@ -0,0 +1,16 @@
#!/bin/bash
main="com.puppycrawl.tools.checkstyle.Main"
new=/tmp/checkcliargs-new
old=/tmp/checkcliargs-old
java -cp "lib/test/*" $main --help >$new
java -cp "examples/lib/test/*" $main --help >$old
if [ "$1" == "-v" ]; then
code --wait --diff $old $new
else
diff $old $new
fi
rm -rf $new $old

6
scripts/cliargs.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
java -cp "lib/test/*" com.puppycrawl.tools.checkstyle.Main --help |\
grep "^ -.*" |\
sed -e "s/ -/-/" -e "s/[,=].*//" -e '/-V/d' -e '/-h/d' |\
sort > "src/test/resources/checkstyle-args.txt"