Skip to content

Commit b66e17b

Browse files
committed
add some quietness and fix dep scanning
1 parent bb00357 commit b66e17b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

analyze.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ if [ "$SPOTBUGS_VERSION" == 'latest' ] || [ "$SPOTBUGS_VERSION" == "" ]; then
1414
fi
1515

1616
# Download SpotBugs
17-
wget https://github.com/spotbugs/spotbugs/releases/download/"${SPOTBUGS_VERSION}"/spotbugs-"${SPOTBUGS_VERSION}".zip
18-
unzip -o spotbugs-"${SPOTBUGS_VERSION}".zip
17+
wget -q https://github.com/spotbugs/spotbugs/releases/download/"${SPOTBUGS_VERSION}"/spotbugs-"${SPOTBUGS_VERSION}".zip
18+
unzip -q -o spotbugs-"${SPOTBUGS_VERSION}".zip
1919

2020
# Run SpotBugs
2121
SPOTBUGS_HOME=spotbugs-"${SPOTBUGS_VERSION}"
@@ -69,8 +69,9 @@ case $OUTPUT_TYPE in
6969
esac
7070

7171
if [ "$DEPENDENCIES_PATH" != "" ]; then
72-
echo "Scanning jars: find ${DEPENDENCIES_PATH} -name "*.jar" -type f > /tmp/jardependencies.txt"
73-
find ${DEPENDENCIES_PATH} -name "*.jar" -type f > /tmp/jardependencies.txt
72+
DEP_CMD="find ${DEPENDENCIES_PATH} -name \"*.jar\" -type f > /tmp/jardependencies.txt"
73+
echo "Scanning jars with: ${DEP_CMD}"
74+
eval ${DEP_CMD}
7475
CMD="$CMD -auxclasspathFromFile /tmp/jardependencies.txt"
7576
fi
7677

@@ -99,6 +100,5 @@ if [ "$OUTPUT_TYPE" == "sarif" ] && [ "$BASE_PATH" != "" ]; then
99100
# prepend the pyhsical path
100101
echo "Transform sarif file to include the physical path"
101102
jq -c "(.runs[].results[].locations[].physicalLocation.artifactLocation.uri) |=\"$BASE_PATH\"+." resultspre.sarif > "$OUTPUT"
102-
cat $OUTPUT
103103
fi
104104

0 commit comments

Comments
 (0)