From a08e60cd07284d936f229c9ff714c8dbce51c75a Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sun, 7 Jul 2013 13:22:29 -0700 Subject: [PATCH] Don't try to parse scripts declared as perl, ruby or python --- ShellCheck/Analytics.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ShellCheck/Analytics.hs b/ShellCheck/Analytics.hs index ca25367..4766355 100644 --- a/ShellCheck/Analytics.hs +++ b/ShellCheck/Analytics.hs @@ -74,6 +74,14 @@ determineShell (T_Script _ shebang _) = normalize $ shellFor shebang normalize "ksh" = return Ksh normalize "zsh" = return Zsh normalize "bash" = return Bash + normalize x | any (`isPrefixOf` x) [ + "csh" + ,"tcsh" + ,"perl" + ,"awk" + ,"python" + ,"ruby" + ] = Nothing normalize _ = return Bash runBasicAnalysis f t = snd $ runState (doAnalysis f t) []