Skip to content

Commit

Permalink
feat: add support for suppressing ignore warnings (#2110)
Browse files Browse the repository at this point in the history
* feat: add support for suppressing ignore warnings

* Update entrypoint.sh
  • Loading branch information
jackton1 authored Oct 9, 2024
1 parent ddfd8a2 commit fc0c55b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ inputs:
escape_paths:
description: "Escaped changed file paths passed to ESLint. NOTE: This defaults to `true` to prevent command injection."
required: false
default: "true"
default: true
warn_ignored:
description: "This option suppresses warning for both File ignored by default and File ignored because of a matching ignore patterns."
required: false
default: false

runs:
using: 'composite'
Expand Down Expand Up @@ -117,6 +121,7 @@ runs:
INPUT_FAIL_ON_ERROR: ${{ inputs.fail_on_error }}
INPUT_REPORTER: ${{ inputs.reporter }}
INPUT_SKIP_ANNOTATIONS: ${{ inputs.token && inputs.skip_annotations || 'true' }}
INPUT_WARN_IGNORED: ${{ inputs.warn_ignored }}

branding:
icon: check-square
Expand Down
6 changes: 5 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ if [[ "$INPUT_SKIP_ANNOTATIONS" != "true" ]]; then
export REVIEWDOG_GITHUB_API_TOKEN=$INPUT_TOKEN
fi

EXTRA_ARGS="--no-warn-ignored $INPUT_EXTRA_ARGS"
EXTRA_ARGS="$INPUT_EXTRA_ARGS"
CONFIG_ARG=""

if [[ "$INPUT_WARN_IGNORED" == "false" ]]; then
EXTRA_ARGS="$EXTRA_ARGS --no-warn-ignored"
fi

if [[ -n "$INPUT_CONFIG_PATH" ]]; then
CONFIG_ARG="--config=${INPUT_CONFIG_PATH}"
fi
Expand Down

0 comments on commit fc0c55b

Please sign in to comment.