Add an empty Custom.hs to simplify site-specific patching
This commit is contained in:
parent
ef764b60ca
commit
bee4303c32
|
@ -10,6 +10,7 @@
|
|||
to specify search paths for sourced files.
|
||||
- json1 format like --format=json but treats tabs as single characters
|
||||
- Recognize FLAGS variables created by the shflags library.
|
||||
- Site-specific changes can now be made in Custom.hs for ease of patching
|
||||
- SC2154: Also warn about unassigned uppercase variables (optional)
|
||||
- SC2252: Warn about `[ $a != x ] || [ $a != y ]`, similar to SC2055
|
||||
- SC2251: Inform about ineffectual ! in front of commands
|
||||
|
|
|
@ -74,6 +74,7 @@ library
|
|||
ShellCheck.AnalyzerLib
|
||||
ShellCheck.Checker
|
||||
ShellCheck.Checks.Commands
|
||||
ShellCheck.Checks.Custom
|
||||
ShellCheck.Checks.ShellSupport
|
||||
ShellCheck.Data
|
||||
ShellCheck.Fixer
|
||||
|
|
|
@ -25,6 +25,7 @@ import ShellCheck.Interface
|
|||
import Data.List
|
||||
import Data.Monoid
|
||||
import qualified ShellCheck.Checks.Commands
|
||||
import qualified ShellCheck.Checks.Custom
|
||||
import qualified ShellCheck.Checks.ShellSupport
|
||||
|
||||
|
||||
|
@ -41,6 +42,7 @@ analyzeScript spec = newAnalysisResult {
|
|||
|
||||
checkers params = mconcat $ map ($ params) [
|
||||
ShellCheck.Checks.Commands.checker,
|
||||
ShellCheck.Checks.Custom.checker,
|
||||
ShellCheck.Checks.ShellSupport.checker
|
||||
]
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
{-
|
||||
This empty file is provided for ease of patching in site specific checks.
|
||||
However, there are no guarantees regarding compatibility between versions.
|
||||
-}
|
||||
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
module ShellCheck.Checks.Custom (checker, ShellCheck.Checks.Custom.runTests) where
|
||||
|
||||
import ShellCheck.AnalyzerLib
|
||||
import Test.QuickCheck
|
||||
|
||||
checker :: Parameters -> Checker
|
||||
checker params = Checker {
|
||||
perScript = const $ return (),
|
||||
perToken = const $ return ()
|
||||
}
|
||||
|
||||
prop_CustomTestsWork = True
|
||||
|
||||
return []
|
||||
runTests = $quickCheckAll
|
|
@ -6,6 +6,7 @@ import qualified ShellCheck.Analytics
|
|||
import qualified ShellCheck.AnalyzerLib
|
||||
import qualified ShellCheck.Checker
|
||||
import qualified ShellCheck.Checks.Commands
|
||||
import qualified ShellCheck.Checks.Custom
|
||||
import qualified ShellCheck.Checks.ShellSupport
|
||||
import qualified ShellCheck.Fixer
|
||||
import qualified ShellCheck.Formatter.Diff
|
||||
|
@ -18,6 +19,7 @@ main = do
|
|||
,ShellCheck.AnalyzerLib.runTests
|
||||
,ShellCheck.Checker.runTests
|
||||
,ShellCheck.Checks.Commands.runTests
|
||||
,ShellCheck.Checks.Custom.runTests
|
||||
,ShellCheck.Checks.ShellSupport.runTests
|
||||
,ShellCheck.Fixer.runTests
|
||||
,ShellCheck.Formatter.Diff.runTests
|
||||
|
|
Loading…
Reference in New Issue