From 0f48bb78a50d4b76b2d1838ee22e3f00d5e8bf1f Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Sat, 1 Feb 2020 22:50:14 -0500 Subject: [PATCH] Remove incorrect otherwise You're supposed to use otherwise where you need a Boolean, not a pattern match. This is misleadingly shadowing the real otherwise. Use _ instead. --- src/ShellCheck/Checks/ShellSupport.hs | 2 +- src/ShellCheck/Data.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ShellCheck/Checks/ShellSupport.hs b/src/ShellCheck/Checks/ShellSupport.hs index 07dfdda..e340d41 100644 --- a/src/ShellCheck/Checks/ShellSupport.hs +++ b/src/ShellCheck/Checks/ShellSupport.hs @@ -487,7 +487,7 @@ checkBraceExpansionVars = ForShell [Bash] f T_DollarBraced {} -> return "$" T_DollarExpansion {} -> return "$" T_DollarArithmetic {} -> return "$" - otherwise -> return "-" + _ -> return "-" toString t = fromJust $ getLiteralStringExt literalExt t isEvaled t = do cmd <- getClosestCommandM t diff --git a/src/ShellCheck/Data.hs b/src/ShellCheck/Data.hs index 732619d..fb4a1e4 100644 --- a/src/ShellCheck/Data.hs +++ b/src/ShellCheck/Data.hs @@ -135,6 +135,6 @@ shellForExecutable name = "ksh" -> return Ksh "ksh88" -> return Ksh "ksh93" -> return Ksh - otherwise -> Nothing + _ -> Nothing flagsForRead = "sreu:n:N:i:p:a:t:"