-
Notifications
You must be signed in to change notification settings - Fork 77
Add an option to check all executable scripts #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,10 @@ inputs: | |
| description: "A space separated list of additional filename to check" | ||
| required: false | ||
| default: "" | ||
| all_scripts: | ||
| description: "Set to true to check all executable scripts. The default is to check only ones with known shebangs" | ||
| required: false | ||
| default: "" | ||
| ignore: | ||
| description: "Paths to ignore when running ShellCheck" | ||
| required: false | ||
|
|
@@ -147,6 +151,7 @@ runs: | |
| shell: bash | ||
| id: check | ||
| env: | ||
| INPUT_ALL_SCRIPTS: ${{ inputs.all_scripts }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Implementation looks good, but consider documenting security implications. The technical implementation correctly implements the new functionality to check all executable scripts with any shebang when
Consider adding documentation in the README to:
Also applies to: 163-164 |
||
| INPUT_SCANDIR: ${{ inputs.scandir }} | ||
| INPUT_CHECK_TOGETHER: ${{ inputs.check_together }} | ||
| INPUT_EXCLUDE_ARGS: ${{ steps.exclude.outputs.excludes }} | ||
|
|
@@ -155,7 +160,8 @@ runs: | |
| run: | | ||
| statuscode=0 | ||
| declare -a filepaths | ||
| shebangregex="^#! */[^ ]*/(env *)?[abk]*sh" | ||
| shebangregex="^#!" | ||
| [ "$INPUT_ALL_SCRIPTS" = "true" ] || shebangregex="^#! */[^ ]*/(env *)?[abk]*sh" | ||
|
|
||
| set -f # temporarily disable globbing so that globs in inputs aren't expanded | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/with-contenv bashio | ||
|
|
||
| echo "hi" | ||
mislav marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Uh oh!
There was an error while loading. Please reload this page.