From e1bf5c0f440433e6f39e7d3e606e769504efa58d Mon Sep 17 00:00:00 2001 From: Sunny Jiao <> Date: Fri, 24 Jan 2025 13:44:35 +0800 Subject: [PATCH] add java variable --- run-checkstyle.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/run-checkstyle.sh b/run-checkstyle.sh index 7b3a921..3d574ff 100755 --- a/run-checkstyle.sh +++ b/run-checkstyle.sh @@ -46,10 +46,18 @@ fi # Path to your Checkstyle configuration file CHECKSTYLE_CONFIG="./conf/checkstyle/checkStyleAll.xml" +# shellcheck disable=SC2027 +# shellcheck disable=SC2046 + +All_Java_Files=$(find . -name "*.java") + # Run Checkstyle on all Java files in the repository -java -jar "$CHECKSTYLE_PATH" -c "$CHECKSTYLE_CONFIG" "$(find . -name "*.java")" +java -jar "$CHECKSTYLE_PATH" -c "$CHECKSTYLE_CONFIG" "$All_Java_Files" + +echo "finish ...." # Capture the exit code of Checkstyle +# shellcheck disable=SC2320 STATUS=$? # Exit with the same status code as Checkstyle