Skip to content

Commit

Permalink
try fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaiszaher committed Feb 29, 2024
1 parent 9460489 commit 80e2f1f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ git config --global --add safe.directory $GITHUB_WORKSPACE
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"

ktlint_version=$(ktlint --version)
# In newer ktlint versions, the command `ktlint --version` returns "ktlint version x.y.z" and we need to remove "ktlint version " from the string
ktlint_version=${ktlint_version#"ktlint version "}


echo "ktlint version: $ktlint_version"

# ktlint_version > 0.49.1
Expand All @@ -55,9 +59,6 @@ else
fi
fi

echo "ANDROID: $ANDROID"
echo "command: ktlint --reporter=checkstyle $CUSTOM_RULE_PATH $RELATIVE $ANDROID $BASELINE $INPUT_FILE_GLOB"

ktlint --reporter=checkstyle $CUSTOM_RULE_PATH $RELATIVE $ANDROID $BASELINE $INPUT_FILE_GLOB |
reviewdog -f=checkstyle \
-name="${INPUT_NAME}" \
Expand Down

0 comments on commit 80e2f1f

Please sign in to comment.