From b0dbc79f6973917aa51f1b9629e7a51a03162751 Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Sun, 5 Apr 2020 15:07:36 -0400 Subject: [PATCH] Remove unnecessary Maybe from isQuoteFreeElement --- src/ShellCheck/AnalyzerLib.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ShellCheck/AnalyzerLib.hs b/src/ShellCheck/AnalyzerLib.hs index 086bd7c..0a4145a 100644 --- a/src/ShellCheck/AnalyzerLib.hs +++ b/src/ShellCheck/AnalyzerLib.hs @@ -293,15 +293,15 @@ isQuoteFree = isQuoteFreeNode False isQuoteFreeNode strict tree t = - (isQuoteFreeElement t == Just True) || + isQuoteFreeElement t || headOrDefault False (mapMaybe isQuoteFreeContext (drop 1 $ getPath tree t)) where -- Is this node self-quoting in itself? isQuoteFreeElement t = case t of - T_Assignment {} -> return True - T_FdRedirect {} -> return True - _ -> Nothing + T_Assignment {} -> True + T_FdRedirect {} -> True + _ -> False -- Are any subnodes inherently self-quoting? isQuoteFreeContext t =