File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2827,6 +2827,8 @@ prop_checkUnpassedInFunctions13 = verifyNotTree checkUnpassedInFunctions "# shel
28272827prop_checkUnpassedInFunctions14 = verifyTree checkUnpassedInFunctions " foo() { echo $#; }; foo"
28282828prop_checkUnpassedInFunctions15 = verifyNotTree checkUnpassedInFunctions " foo() { echo ${1-x}; }; foo"
28292829prop_checkUnpassedInFunctions16 = verifyNotTree checkUnpassedInFunctions " foo() { echo ${1:-x}; }; foo"
2830+ prop_checkUnpassedInFunctions17 = verifyNotTree checkUnpassedInFunctions " foo() { mycommand ${1+--verbose}; }; foo"
2831+ prop_checkUnpassedInFunctions18 = verifyNotTree checkUnpassedInFunctions " foo() { if mycheck; then foo ${1?Missing}; fi; }; foo"
28302832checkUnpassedInFunctions params root =
28312833 execWriter $ mapM_ warnForGroup referenceGroups
28322834 where
@@ -2882,9 +2884,10 @@ checkUnpassedInFunctions params root =
28822884
28832885 isDefaultValueModifier str =
28842886 case str of
2885- ' - ' : _ -> True
2886- ' : ' : ' - ' : _ -> True
2887+ ' : ' : c : _ -> c `elem` handlesDefault
2888+ c : _ -> c `elem` handlesDefault
28872889 _ -> False
2890+ where handlesDefault = " -+?"
28882891
28892892 isArgumentless (_, b, _) = b
28902893 referenceGroups = Map. elems $ foldr updateWith Map. empty referenceList
You can’t perform that action at this time.
0 commit comments