mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-16 10:03:08 -07:00
Make getPath return a NonEmpty
This commit is contained in:
parent
e1ad063834
commit
add49cda17
4 changed files with 40 additions and 38 deletions
|
@ -43,6 +43,7 @@ import Data.Functor.Identity
|
|||
import qualified Data.Graph.Inductive.Graph as G
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
import qualified Data.List.NonEmpty as NE
|
||||
import qualified Data.Map.Strict as M
|
||||
import qualified Data.Set as S
|
||||
import Test.QuickCheck.All (forAllProperties)
|
||||
|
@ -1005,7 +1006,7 @@ checkWhileGetoptsCase = CommandCheck (Exactly "getopts") f
|
|||
sequence_ $ do
|
||||
options <- getLiteralString arg1
|
||||
getoptsVar <- getLiteralString name
|
||||
(T_WhileExpression _ _ body) <- findFirst whileLoop path
|
||||
(T_WhileExpression _ _ body) <- findFirst whileLoop (NE.toList path)
|
||||
T_CaseExpression id var list <- mapMaybe findCase body !!! 0
|
||||
|
||||
-- Make sure getopts name and case variable matches
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue