Skip to content

Commit

Permalink
Merge pull request #1 from SennaLabs/fail-on-error
Browse files Browse the repository at this point in the history
Update action.yml
  • Loading branch information
Alireza Bashiri committed May 15, 2020
2 parents e96015a + 9998363 commit edc3c78
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ inputs:
rubocop_extensions:
description: 'Rubocop extensions'
default: 'rubocop-rails rubocop-performance rubocop-rspec rubocop-i18n rubocop-rake'
fail_on_error:
description: |
Exit code for reviewdog when errors are found [true,false]
Default is `true`.
default: 'true'
runs:
using: 'docker'
image: 'Dockerfile'
Expand Down
7 changes: 6 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"
gem install -N standard $(version $INPUT_RUBOCOP_VERSION)

standardrb ${INPUT_RUBOCOP_FLAGS} \
| reviewdog -f=rubocop -name="${INPUT_TOOL_NAME}" -reporter="${INPUT_REPORTER}" -level="${INPUT_LEVEL}"
| reviewdog \
-f=rubocop \
-name="${INPUT_TOOL_NAME}" \
-reporter="${INPUT_REPORTER}" \
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \
-level="${INPUT_LEVEL}"

0 comments on commit edc3c78

Please sign in to comment.