Skip to content

Commit 8d60852

Browse files
committed
Add regex input
1 parent fad9339 commit 8d60852

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ inputs:
4242
description: 'If set, only warn, never error'
4343
required: false
4444
default: ''
45+
regex:
46+
description: "Regular expression that is used to find words"
47+
required: false
48+
default: ''
4549
runs:
4650
using: 'docker'
4751
image: 'Dockerfile'

entrypoint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ echo "Ignore URI words list '${INPUT_URI_IGNORE_WORDS_LIST}'"
4444
if [ "x${INPUT_URI_IGNORE_WORDS_LIST}" != "x" ]; then
4545
command_args="${command_args} --uri-ignore-words-list ${INPUT_URI_IGNORE_WORDS_LIST}"
4646
fi
47+
echo "Regular expression that is used to find words: '${INPUT_SKIP}'"
48+
if [ "x${INPUT_REGEX}" != "x" ]; then
49+
command_args="${command_args} --regex ${INPUT_REGEX}"
50+
fi
4751
echo "Resulting CLI options ${command_args}"
4852
exec 5>&1
4953
res=`{ { codespell --count ${command_args} ${INPUT_PATH}; echo $? 1>&4; } 1>&5; } 4>&1`

0 commit comments

Comments
 (0)