defining tests in the main library modules seems an unusual design... Note running ldconfig for ghc-ShellCheck is redundant since the library does not live in %{_libdir}/epel9
parent
91e1b15caf
commit
43ecec81c9
@ -0,0 +1,72 @@
|
|||||||
|
diff -up ShellCheck-0.3.4/ShellCheck/Analytics.hs~ ShellCheck-0.3.4/ShellCheck/Analytics.hs
|
||||||
|
--- ShellCheck-0.3.4/ShellCheck/Analytics.hs~ 2014-07-09 10:52:01.000000000 +0900
|
||||||
|
+++ ShellCheck-0.3.4/ShellCheck/Analytics.hs 2014-09-22 11:30:02.572576093 +0900
|
||||||
|
@@ -15,8 +15,7 @@
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-}
|
||||||
|
-{-# LANGUAGE TemplateHaskell #-}
|
||||||
|
-module ShellCheck.Analytics (AnalysisOption(..), filterByAnnotation, runAnalytics, shellForExecutable, runTests) where
|
||||||
|
+module ShellCheck.Analytics (AnalysisOption(..), filterByAnnotation, runAnalytics, shellForExecutable) where
|
||||||
|
|
||||||
|
import Control.Arrow (first)
|
||||||
|
import Control.Monad
|
||||||
|
@@ -2879,7 +2878,3 @@ checkFindActionPrecedence params = check
|
||||||
|
param <- getLiteralString t
|
||||||
|
return $ param `elem` strs
|
||||||
|
warnFor t = warn (getId t) 2146 "This action ignores everything before the -o. Use \\( \\) to group."
|
||||||
|
-
|
||||||
|
-return []
|
||||||
|
-runTests = $quickCheckAll
|
||||||
|
-
|
||||||
|
diff -up ShellCheck-0.3.4/ShellCheck/Parser.hs~ ShellCheck-0.3.4/ShellCheck/Parser.hs
|
||||||
|
--- ShellCheck-0.3.4/ShellCheck/Parser.hs~ 2014-07-09 10:52:01.000000000 +0900
|
||||||
|
+++ ShellCheck-0.3.4/ShellCheck/Parser.hs 2014-09-22 11:30:32.801636172 +0900
|
||||||
|
@@ -15,8 +15,8 @@
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-}
|
||||||
|
-{-# LANGUAGE NoMonomorphismRestriction, TemplateHaskell #-}
|
||||||
|
-module ShellCheck.Parser (Note(..), Severity(..), parseShell, ParseResult(..), ParseNote(..), sortNotes, noteToParseNote, runTests) where
|
||||||
|
+{-# LANGUAGE NoMonomorphismRestriction #-}
|
||||||
|
+module ShellCheck.Parser (Note(..), Severity(..), parseShell, ParseResult(..), ParseNote(..), sortNotes, noteToParseNote) where
|
||||||
|
|
||||||
|
import ShellCheck.AST
|
||||||
|
import ShellCheck.Data
|
||||||
|
@@ -2093,7 +2093,3 @@ parseShell filename contents =
|
||||||
|
|
||||||
|
lt x = trace (show x) x
|
||||||
|
ltt t = trace (show t)
|
||||||
|
-
|
||||||
|
-return []
|
||||||
|
-runTests = $quickCheckAll
|
||||||
|
-
|
||||||
|
diff -up ShellCheck-0.3.4/ShellCheck/Simple.hs~ ShellCheck-0.3.4/ShellCheck/Simple.hs
|
||||||
|
--- ShellCheck-0.3.4/ShellCheck/Simple.hs~ 2014-07-09 10:52:01.000000000 +0900
|
||||||
|
+++ ShellCheck-0.3.4/ShellCheck/Simple.hs 2014-09-22 11:29:17.715486995 +0900
|
||||||
|
@@ -15,15 +15,14 @@
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-}
|
||||||
|
-{-# LANGUAGE TemplateHaskell #-}
|
||||||
|
-module ShellCheck.Simple (shellCheck, ShellCheckComment, scLine, scColumn, scSeverity, scCode, scMessage, runTests) where
|
||||||
|
+module ShellCheck.Simple (shellCheck, ShellCheckComment, scLine, scColumn, scSeverity, scCode, scMessage) where
|
||||||
|
|
||||||
|
import ShellCheck.Parser hiding (runTests)
|
||||||
|
import ShellCheck.Analytics hiding (runTests)
|
||||||
|
import Data.Maybe
|
||||||
|
import Text.Parsec.Pos
|
||||||
|
import Data.List
|
||||||
|
-import Test.QuickCheck.All (quickCheckAll)
|
||||||
|
+--import Test.QuickCheck.All (quickCheckAll)
|
||||||
|
|
||||||
|
shellCheck :: String -> [AnalysisOption] -> [ShellCheckComment]
|
||||||
|
shellCheck script options =
|
||||||
|
@@ -66,7 +65,3 @@ prop_commentDisablesAnalysisIssue1 =
|
||||||
|
null $ shellCheck "#shellcheck disable=SC2086\necho $1" []
|
||||||
|
prop_commentDisablesAnalysisIssue2 =
|
||||||
|
null $ shellCheck "#shellcheck disable=SC2086\n#lol\necho $1" []
|
||||||
|
-
|
||||||
|
-return []
|
||||||
|
-runTests = $quickCheckAll
|
||||||
|
-
|
Loading…
Reference in new issue