mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-09-19 10:16:55 +08:00
Improve SC2143 error message
This commit is contained in:
@@ -3133,8 +3133,8 @@ checkShouldUseGrepQ params t =
|
|||||||
let op = if bool then "-n" else "-z"
|
let op = if bool then "-n" else "-z"
|
||||||
let flip = if bool then "" else "! "
|
let flip = if bool then "" else "! "
|
||||||
return . style id 2143 $
|
return . style id 2143 $
|
||||||
"Instead of [ " ++ op ++ " $(foo | " ++ name ++ " bar) ], " ++
|
"Use " ++ flip ++ name ++ " -q instead of " ++
|
||||||
"use " ++ flip ++ "foo | " ++ name ++ " -q bar ."
|
"comparing output with [ " ++ op ++ " .. ]."
|
||||||
|
|
||||||
getFinalGrep t = do
|
getFinalGrep t = do
|
||||||
cmds <- getPipeline t
|
cmds <- getPipeline t
|
||||||
|
Reference in New Issue
Block a user