shell-linter
shell-linter copied to clipboard
scan_regex too restrictive?
New Issue Checklist
- [x] Using the latest version of azohra/shell-linter
- [x] Able to reproduce error multiple times
- [x] Provided information about the bug
- [x] Attached additional information about the error including logs
Issue Description
The `scan-regex` with `#!.*[/ ](sh|bash|dash|ksh)$` does not expect valid options in shebang.
Steps to Reproduce
Add a repo with a bash file "test.sh" that start with `#!/bin/bash -e`.
Error Message
ShellCheck only supports sh/bash/dash/ksh scripts. For supported scripts to be scanned, make sure to add a proper shebang on the first line of the script.
Logs
n/a
Link to the GitHub Actions workflow (optional)
n/a
Hi,
shellcheck also supports forcing zsh
scripts for example to be interpreted as if they are bash script by adding the following after the shebang:
# shellcheck shell=bash
Is that also something that should be supported? Or is it already and I overlooked something in the configuration?