Skip to content

fail_level: error (or any level above none) makes the job fail on the suggestion step #100

Description

@anatox

What happens

If you set fail_level to anything other than none (error, warning, info, any), the action exits non-zero on the Running shellcheck (suggestion) step even when the main "Running shellcheck" step succeeded. The main step is fine; the suggestion pass breaks the workflow.

How to reproduce

# testdata/test.sh
#!/usr/bin/env bash
echo $1 # Unquoted variables
find . -name *.txt # Unquoted find/grep patterns
- uses: reviewdog/action-shellcheck@v1
  with:
    fail_level: error # any value other than `none` triggers the bug
    level: warning
    filter_mode: nofilter
    reporter: github-pr-review

Expected

Suggestion pass should always succeed (besides internal errors).

Actual output

Action exits with code 1, and the job fails - even though there are no errors reported by shellcheck

::group:: Running shellcheck ...
testdata/test.sh:2:6: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
testdata/test.sh:3:14: warning: Quote the parameter to -name so the shell won't interpret it. (ShellCheck.SC2061)
testdata/test.sh:3:14: info: Use ./*glob* or -- *glob* so names with dashes won't become options. (ShellCheck.SC2035)
::endgroup::
::group:: Running shellcheck (suggestion) ...
testdata/test.sh:2:-echo $1 # Unquoted variables
testdata/test.sh:2:+echo "$1" # Unquoted variables
reviewdog: found at least one issue with severity greater than or equal to the given level: error
::endgroup::

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions