azohra / shell-linter

A Github Action for ShellCheck
https://github.com/marketplace/actions/shell-linter
MIT License
66 stars 13 forks source link

scan_regex too restrictive? #43

Open kaihowl opened 2 years ago

kaihowl commented 2 years ago

New Issue Checklist

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
kaihowl commented 2 years ago

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?