mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-21 20:47:02 +08:00
Use unless instead of when and not
This commit is contained in:
@@ -330,7 +330,7 @@ checkBashisms = ForShell [Sh, Dash, BusyboxSh] $ \t -> do
|
|||||||
| t `isCommand` "echo" && argString `matches` flagRegex =
|
| t `isCommand` "echo" && argString `matches` flagRegex =
|
||||||
if isBusyboxSh
|
if isBusyboxSh
|
||||||
then
|
then
|
||||||
when (not (argString `matches` busyboxFlagRegex)) $
|
unless (argString `matches` busyboxFlagRegex) $
|
||||||
warnMsg (getId arg) 3036 "echo flags besides -n and -e"
|
warnMsg (getId arg) 3036 "echo flags besides -n and -e"
|
||||||
else if isDash
|
else if isDash
|
||||||
then
|
then
|
||||||
|
Reference in New Issue
Block a user