mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 14:27:35 +08:00
Simplify getStringFromParsec
This commit is contained in:
@@ -3456,8 +3456,7 @@ makeErrorFor parsecError =
|
|||||||
pos = errorPos parsecError
|
pos = errorPos parsecError
|
||||||
|
|
||||||
getStringFromParsec errors =
|
getStringFromParsec errors =
|
||||||
case map f errors of
|
headOrDefault "" (mapMaybe f $ reverse errors) ++
|
||||||
r -> unwords (take 1 $ catMaybes $ reverse r) ++
|
|
||||||
" Fix any mentioned problems and try again."
|
" Fix any mentioned problems and try again."
|
||||||
where
|
where
|
||||||
f err =
|
f err =
|
||||||
|
Reference in New Issue
Block a user