Skip to content

Commit

Permalink
#65 catch jpeek errors
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Sep 20, 2023
1 parent eeb090b commit eab442f
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions steps/jpeek-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ build() {
fi
}

jpeek() {
java -jar ${JPEEK} --overwrite --include-ctors --include-static-methods \
--include-private-methods --sources "${project}" \
--target "${dir}" > "${logs}/jpeek-main.log" 2>&1
java -jar ${JPEEK} --overwrite --sources "${project}" \
--target "${dir}cvc" > "${logs}/jpeek-cvc.log" 2>&1
}

declare -i re=0
until build; do
re=re+1
Expand All @@ -75,12 +83,10 @@ dir="${TARGET}/temp/jpeek"

start=$(date +%s)

java -jar ${JPEEK} --overwrite --include-ctors --include-static-methods \
--include-private-methods --sources "${project}" \
--target "${dir}" > "${logs}/jpeek-main.log" 2>&1

java -jar ${JPEEK} --overwrite --sources "${project}" \
--target "${dir}cvc" > "${logs}/jpeek-cvc.log" 2>&1
if ! jpeek; then
echo "Failed to calculate jpeek metrics in ${repo} (${pos}/${total}) due to jpeek.jar error"
exit
fi

accept=".*[^index|matrix|skeleton].xml"
lastm=""
Expand Down

0 comments on commit eab442f

Please sign in to comment.