Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
|
7c87005ebd | |
|
f08b10fc0a |
|
@ -3,3 +3,4 @@
|
|||
/v0.3.3.tar.gz
|
||||
/ShellCheck-0.3.4.tar.gz
|
||||
/ShellCheck-0.3.5.tar.gz
|
||||
/ShellCheck-0.3.8.tar.gz
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
--- ShellCheck-0.3.8/Setup.hs~ 2015-06-21 02:49:31.000000000 +0900
|
||||
+++ ShellCheck-0.3.8/Setup.hs 2019-01-09 22:24:51.145221623 +0900
|
||||
@@ -1,43 +1,2 @@
|
||||
-import Distribution.PackageDescription (
|
||||
- HookedBuildInfo,
|
||||
- emptyHookedBuildInfo )
|
||||
-import Distribution.Simple (
|
||||
- Args,
|
||||
- UserHooks ( preSDist ),
|
||||
- defaultMainWithHooks,
|
||||
- simpleUserHooks )
|
||||
-import Distribution.Simple.Setup ( SDistFlags )
|
||||
-
|
||||
--- | This requires the process package from,
|
||||
---
|
||||
--- https://hackage.haskell.org/package/process
|
||||
---
|
||||
-import System.Process ( callCommand )
|
||||
-
|
||||
-
|
||||
--- | This will use almost the default implementation, except we switch
|
||||
--- out the default pre-sdist hook with our own, 'myPreSDist'.
|
||||
---
|
||||
-main = defaultMainWithHooks myHooks
|
||||
- where
|
||||
- myHooks = simpleUserHooks { preSDist = myPreSDist }
|
||||
-
|
||||
-
|
||||
--- | This hook will be executed before e.g. @cabal sdist@. It runs
|
||||
--- pandoc to create the man page from shellcheck.1.md. If the pandoc
|
||||
--- command is not found, this will fail with an error message:
|
||||
---
|
||||
--- /bin/sh: pandoc: command not found
|
||||
---
|
||||
--- Since the man page is listed in the Extra-Source-Files section of
|
||||
--- our cabal file, a failure here should result in a failure to
|
||||
--- create the distribution tarball (that's a good thing).
|
||||
---
|
||||
-myPreSDist :: Args -> SDistFlags -> IO HookedBuildInfo
|
||||
-myPreSDist _ _ = do
|
||||
- putStrLn "Building the man page..."
|
||||
- putStrLn pandoc_cmd
|
||||
- callCommand pandoc_cmd
|
||||
- return emptyHookedBuildInfo
|
||||
- where
|
||||
- pandoc_cmd = "pandoc -s -t man shellcheck.1.md -o shellcheck.1"
|
||||
+import Distribution.Simple
|
||||
+main = defaultMain
|
||||
|
||||
Diff finished. Wed Jan 9 22:24:54 2019
|
|
@ -1,74 +1,74 @@
|
|||
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
|
||||
diff -up ShellCheck-0.3.8/ShellCheck.cabal~ ShellCheck-0.3.8/ShellCheck.cabal
|
||||
--- ShellCheck-0.3.8/ShellCheck.cabal~ 2015-06-21 02:49:31.000000000 +0900
|
||||
+++ ShellCheck-0.3.8/ShellCheck.cabal 2019-01-09 22:12:22.569657424 +0900
|
||||
@@ -43,8 +43,7 @@ library
|
||||
json,
|
||||
mtl,
|
||||
parsec,
|
||||
- regex-compat,
|
||||
- regex-tdfa,
|
||||
- QuickCheck >= 2.7.4
|
||||
+ regex-compat
|
||||
+ regex-tdfa
|
||||
exposed-modules:
|
||||
ShellCheck.Analytics
|
||||
ShellCheck.AST
|
||||
@@ -63,8 +62,7 @@ executable shellcheck
|
||||
@@ -66,8 +65,7 @@ executable shellcheck
|
||||
mtl,
|
||||
parsec,
|
||||
regex-compat,
|
||||
regex-tdfa,
|
||||
- transformers,
|
||||
- QuickCheck >= 2.7.4
|
||||
+ transformers
|
||||
main-is: shellcheck.hs
|
||||
|
||||
test-suite test-shellcheck
|
||||
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
|
||||
diff -up ShellCheck-0.3.8/ShellCheck/Analytics.hs~ ShellCheck-0.3.8/ShellCheck/Analytics.hs
|
||||
--- ShellCheck-0.3.8/ShellCheck/Analytics.hs~ 2015-06-21 02:49:31.000000000 +0900
|
||||
+++ ShellCheck-0.3.8/ShellCheck/Analytics.hs 2019-01-09 22:05:27.725333403 +0900
|
||||
@@ -15,8 +15,8 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-}
|
||||
-{-# LANGUAGE TemplateHaskell #-}
|
||||
-{-# LANGUAGE TemplateHaskell, FlexibleContexts #-}
|
||||
-module ShellCheck.Analytics (AnalysisOptions(..), defaultAnalysisOptions, filterByAnnotation, runAnalytics, shellForExecutable, runTests) where
|
||||
+{-# LANGUAGE FlexibleContexts #-}
|
||||
+module ShellCheck.Analytics (AnalysisOptions(..), defaultAnalysisOptions, filterByAnnotation, runAnalytics, shellForExecutable) where
|
||||
|
||||
import Control.Arrow (first)
|
||||
import Control.Monad
|
||||
@@ -31,10 +30,9 @@ import Debug.Trace
|
||||
import ShellCheck.AST
|
||||
import ShellCheck.Options
|
||||
import ShellCheck.Data
|
||||
-import ShellCheck.Parser hiding (runTests)
|
||||
+import ShellCheck.Parser
|
||||
import Text.Regex
|
||||
@@ -35,8 +35,8 @@ import ShellCheck.Data
|
||||
import ShellCheck.Parser hiding (runTests)
|
||||
import ShellCheck.Regex
|
||||
import qualified Data.Map as Map
|
||||
-import Test.QuickCheck.All (quickCheckAll)
|
||||
-import Test.QuickCheck.All (forAllProperties)
|
||||
-import Test.QuickCheck.Test (quickCheckWithResult, stdArgs, maxSuccess)
|
||||
+--import Test.QuickCheck.All (forAllProperties)
|
||||
+--import Test.QuickCheck.Test (quickCheckWithResult, stdArgs, maxSuccess)
|
||||
|
||||
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."
|
||||
-
|
||||
@@ -3414,5 +3414,5 @@ checkInjectableFindSh _ = checkCommand "
|
||||
warn id 2156 "Injecting filenames is fragile and insecure. Use parameters."
|
||||
|
||||
|
||||
-return []
|
||||
-runTests = $quickCheckAll
|
||||
-
|
||||
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
|
||||
-runTests = $( [| $(forAllProperties) (quickCheckWithResult (stdArgs { maxSuccess = 1 }) ) |])
|
||||
+-- return []
|
||||
+-- runTests = $( [| $(forAllProperties) (quickCheckWithResult (stdArgs { maxSuccess = 1 }) ) |])
|
||||
diff -up ShellCheck-0.3.8/ShellCheck/Parser.hs~ ShellCheck-0.3.8/ShellCheck/Parser.hs
|
||||
--- ShellCheck-0.3.8/ShellCheck/Parser.hs~ 2019-01-09 22:02:36.617787260 +0900
|
||||
+++ ShellCheck-0.3.8/ShellCheck/Parser.hs 2019-01-09 22:08:02.784828258 +0900
|
||||
@@ -15,8 +15,8 @@
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
yOU should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-}
|
||||
-{-# LANGUAGE NoMonomorphismRestriction, TemplateHaskell #-}
|
||||
-{-# LANGUAGE NoMonomorphismRestriction, TemplateHaskell, FlexibleContexts #-}
|
||||
-module ShellCheck.Parser (Note(..), Severity(..), parseShell, ParseResult(..), ParseNote(..), sortNotes, noteToParseNote, runTests, readScript) where
|
||||
+{-# LANGUAGE NoMonomorphismRestriction #-}
|
||||
+{-# LANGUAGE NoMonomorphismRestriction, FlexibleContexts #-}
|
||||
+module ShellCheck.Parser (Note(..), Severity(..), parseShell, ParseResult(..), ParseNote(..), sortNotes, noteToParseNote, readScript) where
|
||||
|
||||
import ShellCheck.AST
|
||||
import ShellCheck.Data
|
||||
@@ -33,7 +33,6 @@ import Prelude hiding (readList)
|
||||
@@ -34,7 +34,6 @@
|
||||
import System.IO
|
||||
import Text.Parsec.Error
|
||||
import GHC.Exts (sortWith)
|
||||
|
@ -76,19 +76,20 @@ diff -up ShellCheck-0.3.5/ShellCheck/Parser.hs.orig ShellCheck-0.3.5/ShellCheck/
|
|||
|
||||
backslash = char '\\'
|
||||
linefeed = optional carriageReturn >> char '\n'
|
||||
@@ -2137,7 +2136,3 @@ parseShell filename contents =
|
||||
|
||||
@@ -2200,6 +2199,6 @@
|
||||
lt x = trace (show x) x
|
||||
ltt t = trace (show t)
|
||||
-
|
||||
|
||||
-return []
|
||||
-runTests = $quickCheckAll
|
||||
-
|
||||
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
|
||||
+-- return []
|
||||
+-- runTests = $quickCheckAll
|
||||
|
||||
diff -up ShellCheck-0.3.8/ShellCheck/Simple.hs~ ShellCheck-0.3.8/ShellCheck/Simple.hs
|
||||
--- ShellCheck-0.3.8/ShellCheck/Simple.hs~ 2015-06-21 02:49:31.000000000 +0900
|
||||
+++ ShellCheck-0.3.8/ShellCheck/Simple.hs 2019-01-09 22:09:21.861080654 +0900
|
||||
@@ -15,15 +15,14 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-}
|
||||
-{-# LANGUAGE TemplateHaskell #-}
|
||||
|
@ -103,14 +104,16 @@ diff -up ShellCheck-0.3.5/ShellCheck/Simple.hs.orig ShellCheck-0.3.5/ShellCheck/
|
|||
-import ShellCheck.Parser hiding (runTests)
|
||||
-import Test.QuickCheck.All (quickCheckAll)
|
||||
+import ShellCheck.Parser
|
||||
+--import Test.QuickCheck.All (quickCheckAll)
|
||||
import Text.Parsec.Pos
|
||||
|
||||
shellCheck :: AnalysisOptions -> String -> [ShellCheckComment]
|
||||
@@ -71,7 +69,3 @@ prop_commentDisablesAnalysisIssue2 =
|
||||
@@ -75,6 +74,6 @@ prop_optionDisablesIssue1 =
|
||||
prop_optionDisablesIssue2 =
|
||||
null $ shellCheck (defaultAnalysisOptions { optionExcludes = [2148, 1037] }) "echo \"$10\""
|
||||
|
||||
prop_optionDisablesIssue1 =
|
||||
null $ shellCheck (defaultAnalysisOptions { optionExcludes = [2086, 2148] }) "echo $1"
|
||||
-
|
||||
-return []
|
||||
-runTests = $quickCheckAll
|
||||
-
|
||||
+-- return []
|
||||
+-- runTests = $quickCheckAll
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
# re-enable after QuickCheck code moved out of main src files
|
||||
# (see https://github.com/koalaman/shellcheck/issues/254)
|
||||
#%%ifarch %(echo %{ghc_arches_with_ghci} | sed -e s/armv7hl//)
|
||||
#%%ifarch %%(echo %%{ghc_arches_with_ghci} | sed -e s/armv7hl//)
|
||||
#%%bcond_without tests
|
||||
#%%else
|
||||
#%%bcond_with tests
|
||||
|
@ -14,14 +14,15 @@
|
|||
%bcond_with tests
|
||||
|
||||
Name: %{pkg_name}
|
||||
Version: 0.3.5
|
||||
Version: 0.3.8
|
||||
Release: 1%{?dist}
|
||||
Summary: Tool for checking common errors in POSIX shell scripts
|
||||
|
||||
License: AGPLv3+
|
||||
License: GPLv3+
|
||||
URL: http://www.shellcheck.net/about.html
|
||||
Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
|
||||
Patch0: ShellCheck-disable-TemplateHaskell-runTests.patch
|
||||
Patch1: ShellCheck-0.3.8-Setup-defaultMain.patch
|
||||
|
||||
BuildRequires: ghc-Cabal-devel
|
||||
BuildRequires: ghc-rpm-macros
|
||||
|
@ -32,7 +33,7 @@ BuildRequires: ghc-directory-devel
|
|||
BuildRequires: ghc-json-devel
|
||||
BuildRequires: ghc-mtl-devel
|
||||
BuildRequires: ghc-parsec-devel
|
||||
BuildRequires: ghc-regex-compat-devel
|
||||
BuildRequires: ghc-regex-tdfa-devel
|
||||
BuildRequires: ghc-transformers-devel
|
||||
%if %{with tests}
|
||||
BuildRequires: ghc-QuickCheck-devel
|
||||
|
@ -77,7 +78,7 @@ This package provides the Haskell %{name} library development files.
|
|||
%if %{without tests}
|
||||
%patch0 -p1 -b .orig
|
||||
%endif
|
||||
|
||||
%patch1 -p1 -b .orig
|
||||
|
||||
%build
|
||||
LANG=en_US.utf8
|
||||
|
@ -109,14 +110,14 @@ install -Dpm 0644 shellcheck.1 %{buildroot}%{_mandir}/man1/shellcheck.1
|
|||
|
||||
|
||||
%files
|
||||
%doc LICENSE
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{_bindir}/shellcheck
|
||||
%{_mandir}/man1/shellcheck.1*
|
||||
|
||||
|
||||
%files -n ghc-%{name} -f ghc-%{name}.files
|
||||
%doc LICENSE
|
||||
%license LICENSE
|
||||
|
||||
|
||||
%files -n ghc-%{name}-devel -f ghc-%{name}-devel.files
|
||||
|
@ -124,6 +125,9 @@ install -Dpm 0644 shellcheck.1 %{buildroot}%{_mandir}/man1/shellcheck.1
|
|||
|
||||
|
||||
%changelog
|
||||
* Wed Jan 9 2019 Jens Petersen <petersen@redhat.com> - 0.3.8-1
|
||||
- update to 0.3.8
|
||||
|
||||
* Wed Jan 28 2015 Jens Petersen <petersen@redhat.com> - 0.3.5-1
|
||||
- update to 0.3.5
|
||||
|
||||
|
|
Loading…
Reference in New Issue