mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-16 10:03:08 -07:00
Simplify getStringFromParsec
This commit is contained in:
parent
6c81505870
commit
3f40b688ee
1 changed files with 2 additions and 3 deletions
|
@ -3456,9 +3456,8 @@ makeErrorFor parsecError =
|
|||
pos = errorPos parsecError
|
||||
|
||||
getStringFromParsec errors =
|
||||
case map f errors of
|
||||
r -> unwords (take 1 $ catMaybes $ reverse r) ++
|
||||
" Fix any mentioned problems and try again."
|
||||
headOrDefault "" (mapMaybe f $ reverse errors) ++
|
||||
" Fix any mentioned problems and try again."
|
||||
where
|
||||
f err =
|
||||
case err of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue