Some cleanup and refactoring.

This commit is contained in:
Vidar Holen 2016-11-12 15:51:36 -08:00
parent 3a006f7bcb
commit 08f7ff37c5
9 changed files with 525 additions and 382 deletions

View file

@ -24,6 +24,7 @@ import ShellCheck.AnalyzerLib
import ShellCheck.Interface
import Data.List
import qualified ShellCheck.Checks.Commands
import qualified ShellCheck.Checks.ShellSupport
-- TODO: Clean up the cruft this is layered on
@ -32,5 +33,12 @@ analyzeScript spec = AnalysisResult {
arComments =
filterByAnnotation (asScript spec) . nub $
runAnalytics spec
++ ShellCheck.Checks.Commands.runChecks spec
++ runChecker params (checkers params)
}
where
params = makeParameters spec
checkers params = mconcat $ map ($ params) [
ShellCheck.Checks.Commands.checker,
ShellCheck.Checks.ShellSupport.checker
]