Skip to content

Commit

Permalink
add java variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunny Jiao committed Jan 24, 2025
1 parent 0521b0a commit e1bf5c0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion run-checkstyle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e1bf5c0

Please sign in to comment.