Skip to content

Commit

Permalink
feat(action): Add support for force-exclude option
Browse files Browse the repository at this point in the history
When using typos with changed-files, the `extend-exclude` setting in the
configuration file is ignored, leading to checks on unwanted
directories.

This update ensures ensurs target directories are consistently ignored
and avoids unnecessary validations.
  • Loading branch information
manic committed Sep 10, 2024
1 parent 945d407 commit 55a58d9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ inputs:
required: false
default: false

force_exclude:
description: "Force exclude of files or patterns"
required: false
default: false

config:
description: "Use a custom config file."
required: false
Expand All @@ -42,6 +47,7 @@ runs:
INPUT_EXTEND_WORDS: ${{ inputs.extend_words }}
INPUT_ISOLATED: ${{ inputs.isolated }}
INPUT_WRITE_CHANGES: ${{ inputs.write_changes }}
INPUT_FORCE_EXCLUDE: ${{ inputs.force_exclude }}
INPUT_CONFIG: ${{ inputs.config }}

branding:
Expand Down
5 changes: 5 additions & 0 deletions action/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ if [ "${INPUT_WRITE_CHANGES:-false}" == "true" ]; then
ARGS+=" --write-changes"
fi

# Force exclude of files or patterns
if [ "${INPUT_FORCE_EXCLUDE:-false}" == "true" ]; then
ARGS+=" --force-exclude"
fi

# Use a custom configuration file
if [[ -n "${INPUT_CONFIG:-}" ]]; then
ARGS+=" --config ${INPUT_CONFIG}"
Expand Down

0 comments on commit 55a58d9

Please sign in to comment.