Skip to content

Commit

Permalink
Merge branch 'support-disabled-rules' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
le0nidas committed Mar 28, 2021
2 parents 6f299bf + 561ca32 commit 1ff891a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ runs:
inputs:
repotoken:
description: A token that grands access to read/write actions. Usually secrets.GITHUB_TOKEN.
required: true
required: true

disabledrules:
description: Comma separated list of rules to disable
required: false
3 changes: 2 additions & 1 deletion image/run-scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ echo ''

echo 'Running ktlint...'
echo "::debug::$COLLECTION_REPORT=$(cat $COLLECTION_REPORT)"
./ktlint $(cat $COLLECTION_REPORT | awk 'BEGIN { ORS=" " }; {print $1}') --reporter=json,output=$KTLINT_REPORT
./ktlint $(cat $COLLECTION_REPORT | awk 'BEGIN { ORS=" " }; {print $1}') --reporter=json,output=$KTLINT_REPORT --disabled_rules=$INPUT_DISABLEDRULES

echo "::debug::$KTLINT_REPORT=$(cat $KTLINT_REPORT)"

if [ "$(cat $KTLINT_REPORT)" = "$EMPTY_KTLINT_REPORT" ]; then
Expand Down

0 comments on commit 1ff891a

Please sign in to comment.