Ignore some shell scripts, add files without shebang line
bewuethr opened this issue · 1 comments
bewuethr commented
Currently, the check is for file
output matching shell script
. This is both including things it shouldn't (fish shell, C shell scripts) and excluding files without a shebang line.
The check for file
output should be more precise (see file
source code), and files identified by their extension should be included.
From the ShellCheck man page:
Specify Bourne shell dialect. Valid values are sh, bash, dash and ksh. The
default is to deduce the shell from the file's shell directive, shebang, or
.bash/.bats/.dash/.ksh extension, in that order. sh refers to POSIX sh (not
the system's), and will warn of portability issues.
bewuethr commented
Want:
file
output matchingPOSIX shell script
Korn shell script
Bourne-Again shell script
/usr/bin/env sh script
/usr/bin/env ksh script
- filenames ending in
.sh
.bash
.ksh