Skip to content

Commit

Permalink
chore: drop code-style after v0.50.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaiszaher committed Oct 16, 2023
1 parent 8b728e4 commit 8f6f406
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ ktlint_version=$(ktlint --version)
echo "ktlint version: $ktlint_version"

if [ "$(printf '%s\n' "0.49.1" "$ktlint_version" | sort -V | head -n1)" = "0.49.1" ]; then
if [ "$INPUT_ANDROID" = true ]; then
export ANDROID="--code-style=android_studio"
else
export ANDROID="--code-style=intellij_idea"
# --code-style is deprecated and .editorconfig needs to be used: https://pinterest.github.io/ktlint/latest/rules/code-styles/
if [ "$(printf '%s\n' "0.50.0" "$ktlint_version" | sort -V | head -n1)" = "0.50.0" ]; then
if [ "$INPUT_ANDROID" = true ]; then
export ANDROID="--code-style=android_studio"
else
export ANDROID="--code-style=intellij_idea"
fi
fi
else
if [ "$INPUT_ANDROID" = true ]; then
Expand All @@ -55,4 +58,3 @@ ktlint --reporter=checkstyle $CUSTOM_RULE_PATH $RELATIVE $ANDROID $BASELINE $INP
-level="${INPUT_LEVEL}" \
-filter-mode="${INPUT_FILTER_MODE}" \
-fail-on-error="${INPUT_FAIL_ON_ERROR}"

0 comments on commit 8f6f406

Please sign in to comment.