diff --git a/src/ShellCheck/Analytics.hs b/src/ShellCheck/Analytics.hs index 7754ee6..a164de1 100644 --- a/src/ShellCheck/Analytics.hs +++ b/src/ShellCheck/Analytics.hs @@ -2692,7 +2692,7 @@ checkRedirectedNowhere params token = case drop 1 $ getPath (parentMap params) t of T_DollarExpansion _ [_] : _ -> True T_Backticked _ [_] : _ -> True - T_Annotation _ _ u : _ -> isInExpansion u + t@T_Annotation {} : _ -> isInExpansion t _ -> False getDanglingRedirect token = case token of diff --git a/src/ShellCheck/Checker.hs b/src/ShellCheck/Checker.hs index 7ac9c91..10074e3 100644 --- a/src/ShellCheck/Checker.hs +++ b/src/ShellCheck/Checker.hs @@ -231,5 +231,7 @@ prop_filewideAnnotation8 = null $ prop_sourcePartOfOriginalScript = -- #1181: -x disabled posix warning for 'source' 2039 `elem` checkWithIncludes [("./saywhat.sh", "echo foo")] "#!/bin/sh\nsource ./saywhat.sh" +prop_spinBug1413 = null $ check "fun() {\n# shellcheck disable=SC2188\n> /dev/null\n}\n" + return [] runTests = $quickCheckAll