From 6595e14d25deed617b4c8a9c7d2162ee29d77198 Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Sun, 2 Feb 2020 00:22:52 -0500 Subject: [PATCH] Adjust a pattern to avoid tail --- src/ShellCheck/Analytics.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ShellCheck/Analytics.hs b/src/ShellCheck/Analytics.hs index cf8015b..ddc3b43 100644 --- a/src/ShellCheck/Analytics.hs +++ b/src/ShellCheck/Analytics.hs @@ -1644,9 +1644,9 @@ checkSpuriousExec _ = doLists doList = doList' . stripCleanup -- The second parameter is True if we are in a loop -- In that case we should emit the warning also if `exec' is the last statement - doList' t@(current:following:_) False = do + doList' (current:t@(following:_)) False = do commentIfExec current - doList (tail t) False + doList t False doList' (current:tail) True = do commentIfExec current doList tail True