mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-07 21:41:34 -07:00
Use null instead of comparing with empty lists
This commit is contained in:
parent
e6e89d68fd
commit
c29b6afa56
5 changed files with 14 additions and 14 deletions
|
@ -3169,7 +3169,7 @@ readScriptFile sourced = do
|
|||
Nothing -> parseProblemAt pos ErrorC 1008 "This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify."
|
||||
|
||||
isValidShell s =
|
||||
let good = s == "" || any (`isPrefixOf` s) goodShells
|
||||
let good = null s || any (`isPrefixOf` s) goodShells
|
||||
bad = any (`isPrefixOf` s) badShells
|
||||
in
|
||||
if good
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue