Skip to content

Commit

Permalink
Merge pull request #12 from antmicro/wsip/fail_on_error
Browse files Browse the repository at this point in the history
Add action input fail_on_error
  • Loading branch information
tgorochowik authored Sep 22, 2021
2 parents dba009e + 3a03373 commit e6962a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ inputs:
description: 'Post results of using --autofix option as change suggestions,
works only with github-pre-review reporter'
default: 'true'
fail_on_error:
description: 'Fail the action when rule violations are found'
default: 'false'


runs:
using: 'docker'
Expand Down
8 changes: 4 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if [ "$INPUT_SUGGEST_FIXES" = "true" ]; then
--exclude-paths "$INPUT_EXCLUDE_PATHS" \
--log-file "$INPUT_LOG_FILE" \
--patch "$patch" \
"$INPUT_PATHS" || exitcode=$?
"$INPUT_PATHS"

/opt/antmicro/rdf_gen.py \
--efm-file "$INPUT_LOG_FILE" \
Expand All @@ -49,7 +49,7 @@ else
--extra-opts "$INPUT_EXTRA_ARGS" \
--exclude-paths "$INPUT_EXCLUDE_PATHS" \
--log-file "$INPUT_LOG_FILE" \
"$INPUT_PATHS" || exitcode=$?
"$INPUT_PATHS"

/opt/antmicro/rdf_gen.py \
--efm-file "$INPUT_LOG_FILE" > "$rdf_log"
Expand All @@ -59,9 +59,9 @@ echo "Running reviewdog"

"$GOBIN"/reviewdog -f=rdjson \
-reporter="$INPUT_REVIEWDOG_REPORTER" \
-fail-on-error="false" \
-fail-on-error="$INPUT_FAIL_ON_ERROR" \
-name="verible-verilog-lint" \
-diff="$diff_cmd" < "$rdf_log" || cat "$INPUT_LOG_FILE"
-diff="$diff_cmd" < "$rdf_log" || exitcode=$?

if [ -f "$event_file" ]; then
git checkout -
Expand Down

0 comments on commit e6962a5

Please sign in to comment.