mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-06 21:11:35 -07:00
Merge pull request #1827 from josephcsible/nofromjust2
Remove more unnecessary uses of fromJust
This commit is contained in:
commit
b88b253cad
2 changed files with 7 additions and 7 deletions
|
@ -1982,18 +1982,18 @@ checkQuotesInLiterals params t =
|
|||
|
||||
readF _ expr name = do
|
||||
assignment <- getQuotes name
|
||||
return
|
||||
(if isJust assignment
|
||||
&& not (isParamTo parents "eval" expr)
|
||||
return $ case assignment of
|
||||
Just j
|
||||
| not (isParamTo parents "eval" expr)
|
||||
&& not (isQuoteFree parents expr)
|
||||
&& not (squashesQuotes expr)
|
||||
then [
|
||||
makeComment WarningC (fromJust assignment) 2089 $
|
||||
-> [
|
||||
makeComment WarningC j 2089 $
|
||||
"Quotes/backslashes will be treated literally. " ++ suggestion,
|
||||
makeComment WarningC (getId expr) 2090
|
||||
"Quotes/backslashes in this variable will not be respected."
|
||||
]
|
||||
else [])
|
||||
_ -> []
|
||||
suggestion =
|
||||
if supportsArrays (shellType params)
|
||||
then "Use an array."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue