diff --git a/.gitignore b/.gitignore index 7c7d07a..068cd81 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /v0.3.1.tar.gz /v0.3.3.tar.gz /ShellCheck-0.3.4.tar.gz +/ShellCheck-0.3.5.tar.gz diff --git a/ShellCheck-disable-TemplateHaskell-runTests.patch b/ShellCheck-disable-TemplateHaskell-runTests.patch index a753d01..546dedc 100644 --- a/ShellCheck-disable-TemplateHaskell-runTests.patch +++ b/ShellCheck-disable-TemplateHaskell-runTests.patch @@ -1,42 +1,42 @@ -diff -up ShellCheck-0.3.4/ShellCheck.cabal.orig ShellCheck-0.3.4/ShellCheck.cabal ---- ShellCheck-0.3.4/ShellCheck.cabal.orig 2014-07-09 10:52:01.000000000 +0900 -+++ ShellCheck-0.3.4/ShellCheck.cabal 2014-11-06 19:44:37.829332580 +0900 +diff -up ShellCheck-0.3.5/ShellCheck.cabal.orig ShellCheck-0.3.5/ShellCheck.cabal +--- ShellCheck-0.3.5/ShellCheck.cabal.orig 2015-01-29 00:11:08.454696154 +0900 ++++ ShellCheck-0.3.5/ShellCheck.cabal 2015-01-29 00:20:26.583236331 +0900 @@ -41,8 +41,7 @@ library json, mtl, parsec, - regex-compat, -- QuickCheck >= 2.2 +- QuickCheck >= 2.7.4 + regex-compat exposed-modules: ShellCheck.Analytics ShellCheck.AST -@@ -61,8 +60,7 @@ executable shellcheck - json, +@@ -63,8 +62,7 @@ executable shellcheck mtl, parsec, -- regex-compat, -- QuickCheck >= 2.2 -+ regex-compat + regex-compat, +- transformers, +- QuickCheck >= 2.7.4 ++ transformers main-is: shellcheck.hs test-suite test-shellcheck -diff -up ShellCheck-0.3.4/ShellCheck/Analytics.hs.orig ShellCheck-0.3.4/ShellCheck/Analytics.hs ---- ShellCheck-0.3.4/ShellCheck/Analytics.hs.orig 2014-07-09 10:52:01.000000000 +0900 -+++ ShellCheck-0.3.4/ShellCheck/Analytics.hs 2014-11-07 13:56:50.249086778 +0900 +diff -up ShellCheck-0.3.5/ShellCheck/Analytics.hs.orig ShellCheck-0.3.5/ShellCheck/Analytics.hs +--- ShellCheck-0.3.5/ShellCheck/Analytics.hs.orig 2014-11-10 09:58:27.000000000 +0900 ++++ ShellCheck-0.3.5/ShellCheck/Analytics.hs 2015-01-29 00:18:16.554343457 +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 +-module ShellCheck.Analytics (AnalysisOptions(..), defaultAnalysisOptions, filterByAnnotation, runAnalytics, shellForExecutable, runTests) where ++module ShellCheck.Analytics (AnalysisOptions(..), defaultAnalysisOptions, filterByAnnotation, runAnalytics, shellForExecutable) where import Control.Arrow (first) import Control.Monad -@@ -30,10 +29,9 @@ import Data.Maybe - import Debug.Trace +@@ -31,10 +30,9 @@ import Debug.Trace import ShellCheck.AST + import ShellCheck.Options import ShellCheck.Data -import ShellCheck.Parser hiding (runTests) +import ShellCheck.Parser @@ -44,9 +44,9 @@ diff -up ShellCheck-0.3.4/ShellCheck/Analytics.hs.orig ShellCheck-0.3.4/ShellChe import qualified Data.Map as Map -import Test.QuickCheck.All (quickCheckAll) - data Shell = Ksh | Zsh | Sh | Bash - deriving (Show, Eq) -@@ -2879,7 +2877,3 @@ checkFindActionPrecedence params = check + data Parameters = Parameters { + variableFlow :: [StackData], +@@ -3011,7 +3009,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." @@ -54,17 +54,17 @@ diff -up ShellCheck-0.3.4/ShellCheck/Analytics.hs.orig ShellCheck-0.3.4/ShellChe -return [] -runTests = $quickCheckAll - -diff -up ShellCheck-0.3.4/ShellCheck/Parser.hs.orig ShellCheck-0.3.4/ShellCheck/Parser.hs ---- ShellCheck-0.3.4/ShellCheck/Parser.hs.orig 2014-07-09 10:52:01.000000000 +0900 -+++ ShellCheck-0.3.4/ShellCheck/Parser.hs 2014-11-06 19:44:37.830332583 +0900 +diff -up ShellCheck-0.3.5/ShellCheck/Parser.hs.orig ShellCheck-0.3.5/ShellCheck/Parser.hs +--- ShellCheck-0.3.5/ShellCheck/Parser.hs.orig 2014-11-10 09:58:27.000000000 +0900 ++++ ShellCheck-0.3.5/ShellCheck/Parser.hs 2015-01-29 00:18:46.037319167 +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 +-module ShellCheck.Parser (Note(..), Severity(..), parseShell, ParseResult(..), ParseNote(..), sortNotes, noteToParseNote, runTests, readScript) where +{-# LANGUAGE NoMonomorphismRestriction #-} -+module ShellCheck.Parser (Note(..), Severity(..), parseShell, ParseResult(..), ParseNote(..), sortNotes, noteToParseNote) where ++module ShellCheck.Parser (Note(..), Severity(..), parseShell, ParseResult(..), ParseNote(..), sortNotes, noteToParseNote, readScript) where import ShellCheck.AST import ShellCheck.Data @@ -76,7 +76,7 @@ diff -up ShellCheck-0.3.4/ShellCheck/Parser.hs.orig ShellCheck-0.3.4/ShellCheck/ backslash = char '\\' linefeed = optional carriageReturn >> char '\n' -@@ -2093,7 +2092,3 @@ parseShell filename contents = +@@ -2137,7 +2136,3 @@ parseShell filename contents = lt x = trace (show x) x ltt t = trace (show t) @@ -84,9 +84,9 @@ diff -up ShellCheck-0.3.4/ShellCheck/Parser.hs.orig ShellCheck-0.3.4/ShellCheck/ -return [] -runTests = $quickCheckAll - -diff -up ShellCheck-0.3.4/ShellCheck/Simple.hs.orig ShellCheck-0.3.4/ShellCheck/Simple.hs ---- ShellCheck-0.3.4/ShellCheck/Simple.hs.orig 2014-07-09 10:52:01.000000000 +0900 -+++ ShellCheck-0.3.4/ShellCheck/Simple.hs 2014-11-07 13:57:03.711115912 +0900 +diff -up ShellCheck-0.3.5/ShellCheck/Simple.hs.orig ShellCheck-0.3.5/ShellCheck/Simple.hs +--- ShellCheck-0.3.5/ShellCheck/Simple.hs.orig 2015-01-29 00:11:08.456696153 +0900 ++++ ShellCheck-0.3.5/ShellCheck/Simple.hs 2015-01-29 00:19:39.305275281 +0900 @@ -15,15 +15,13 @@ 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/>. @@ -95,21 +95,21 @@ diff -up ShellCheck-0.3.4/ShellCheck/Simple.hs.orig ShellCheck-0.3.4/ShellCheck/ -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 ShellCheck.Parser -+import ShellCheck.Analytics - import Data.Maybe - import Text.Parsec.Pos import Data.List + import Data.Maybe +-import ShellCheck.Analytics hiding (runTests) ++import ShellCheck.Analytics + import ShellCheck.Options +-import ShellCheck.Parser hiding (runTests) -import Test.QuickCheck.All (quickCheckAll) ++import ShellCheck.Parser + import Text.Parsec.Pos - shellCheck :: String -> [AnalysisOption] -> [ShellCheckComment] - shellCheck script options = -@@ -66,7 +64,3 @@ prop_commentDisablesAnalysisIssue1 = - null $ shellCheck "#shellcheck disable=SC2086\necho $1" [] - prop_commentDisablesAnalysisIssue2 = - null $ shellCheck "#shellcheck disable=SC2086\n#lol\necho $1" [] + shellCheck :: AnalysisOptions -> String -> [ShellCheckComment] +@@ -71,7 +69,3 @@ prop_commentDisablesAnalysisIssue2 = + + prop_optionDisablesIssue1 = + null $ shellCheck (defaultAnalysisOptions { optionExcludes = [2086, 2148] }) "echo $1" - -return [] -runTests = $quickCheckAll diff --git a/ShellCheck.spec b/ShellCheck.spec index c7e1492..91b6bba 100644 --- a/ShellCheck.spec +++ b/ShellCheck.spec @@ -14,8 +14,8 @@ %bcond_with tests Name: %{pkg_name} -Version: 0.3.4 -Release: 2%{?dist} +Version: 0.3.5 +Release: 1%{?dist} Summary: Tool for checking common errors in POSIX shell scripts License: AGPLv3+ @@ -33,6 +33,7 @@ BuildRequires: ghc-json-devel BuildRequires: ghc-mtl-devel BuildRequires: ghc-parsec-devel BuildRequires: ghc-regex-compat-devel +BuildRequires: ghc-transformers-devel %if %{with tests} BuildRequires: ghc-QuickCheck-devel %endif @@ -123,6 +124,9 @@ install -Dpm 0644 shellcheck.1 %{buildroot}%{_mandir}/man1/shellcheck.1 %changelog +* Wed Jan 28 2015 Jens Petersen <petersen@redhat.com> - 0.3.5-1 +- update to 0.3.5 + * Tue Nov 4 2014 Jens Petersen <petersen@redhat.com> - 0.3.4-2 - disable tests on all archs (#1158522) - QuickCheck should really only be used for buildtime tests diff --git a/sources b/sources index af31e06..d50fe8a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f69a49b67d054502da594e4ab151d626 ShellCheck-0.3.4.tar.gz +2ba0a1978d04535aa386b0efb30f23c9 ShellCheck-0.3.5.tar.gz