Separate out command specific checks.

The checks use a better interface and give
an overall speed boost of 10%.
This commit is contained in:
Vidar Holen
2016-04-10 17:01:40 -07:00
parent 9911470d67
commit db0c8c2dc9
7 changed files with 1219 additions and 1019 deletions

View File

@@ -19,9 +19,18 @@
-}
module ShellCheck.Analyzer (analyzeScript) where
import ShellCheck.Interface
import ShellCheck.Analytics
import ShellCheck.AnalyzerLib
import ShellCheck.Interface
import Data.List
import qualified ShellCheck.Checks.Commands
-- TODO: Clean up the cruft this is layered on
analyzeScript :: AnalysisSpec -> AnalysisResult
analyzeScript = runAnalytics
analyzeScript spec = AnalysisResult {
arComments =
filterByAnnotation (asScript spec) . nub $
runAnalytics spec
++ ShellCheck.Checks.Commands.runChecks spec
}