File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,18 @@ inputs:
50
50
description : " Files or directories to check"
51
51
required : false
52
52
default : ' '
53
+ after_context :
54
+ description : " Print a number of lines of trailing context"
55
+ required : false
56
+ default : ' '
57
+ before_context :
58
+ description : " Print a number of lines of leading context"
59
+ required : false
60
+ default : ' '
61
+ context :
62
+ description : " Print a number of lines of surrounding context"
63
+ required : false
64
+ default : ' '
53
65
runs :
54
66
using : ' docker'
55
67
image : ' Dockerfile'
Original file line number Diff line number Diff line change @@ -52,6 +52,18 @@ echo "Files or directories to check: '${INPUT_SKIP}'"
52
52
if [ " x${INPUT_FILES} " != " x" ]; then
53
53
command_args=" ${command_args} --regex ${INPUT_FILES} "
54
54
fi
55
+ echo " Print a number of lines of trailing context: '${INPUT_AFTER_CONTEXT} '"
56
+ if [ " x${INPUT_AFTER_CONTEXT} " != " x" ]; then
57
+ command_args=" ${command_args} --after-context ${INPUT_AFTER_CONTEXT} "
58
+ fi
59
+ echo " Print a number of lines of leading context: '${INPUT_BEFORE_CONTEXT} '"
60
+ if [ " x${INPUT_BEFORE_CONTEXT} " != " x" ]; then
61
+ command_args=" ${command_args} --before-context ${INPUT_BEFORE_CONTEXT} "
62
+ fi
63
+ echo " Print a number of lines of surrounding context: '${INPUT_CONTEXT} '"
64
+ if [ " x${INPUT_CONTEXT} " != " x" ]; then
65
+ command_args=" ${command_args} --context ${INPUT_CONTEXT} "
66
+ fi
55
67
echo " Resulting CLI options ${command_args} "
56
68
exec 5>&1
57
69
res=` { { codespell --count ${command_args} ${INPUT_PATH} ; echo $? 1>&4 ; } 1>&5 ; } 4>&1 `
You can’t perform that action at this time.
0 commit comments