Skip to content

Commit

Permalink
chore: Fix incorrect early exit in Javadoc quality script (#3932)
Browse files Browse the repository at this point in the history
  • Loading branch information
slarse authored May 20, 2021
1 parent 89bb302 commit 467cf2b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions chore/ci-checkstyle-javadoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ JAVADOC_CHECKSTYLE_CONFIG="__SPOON_CI_checkstyle-javadoc.xml"
COMPARE_WITH_MASTER_ARG="COMPARE_WITH_MASTER"
RELATED_ISSUE_URL="https://github.com/inria/spoon/issues/3923"

if [[ $(git branch --show-current) == "$COMPARE_BRANCH" ]]; then
# nothing to compare, we're on the main branch
exit 0
fi

function cleanup() {
if [ -f "$JAVADOC_CHECKSTYLE_CONFIG" ]; then
rm "$JAVADOC_CHECKSTYLE_CONFIG"
Expand Down Expand Up @@ -105,6 +100,12 @@ if [ "$#" != 1 ]; then
fi

if [ "$1" == "$COMPARE_WITH_MASTER_ARG" ]; then
if [ $(git branch --show-current) == "$COMPARE_BRANCH" ]; then
# nothing to compare, we're on the main branch
echo "Already on branch $COMPARE_BRANCH, nothing to compare"
exit 0
fi

main
else
grep "$1" <<< `run_checkstyle`
Expand Down

0 comments on commit 467cf2b

Please sign in to comment.