From b33607b048ad88ea4555c1dc2e13ea14d7e75d34 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Thu, 8 Mar 2018 18:41:23 +0200 Subject: [PATCH 1/2] Add custom-setup stanza and containers lowerbound custom-setup: - http://cabal.readthedocs.io/en/latest/developing-packages.html#custom-setup-scripts - https://www.well-typed.com/blog/2015/07/cabal-setup-deps/ Bounds: - containers-0.5 is required if Data.Map.Strict - parsec-3.0 for Text.Parsec - json-0.3.6 for makeObj --- ShellCheck.cabal | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ShellCheck.cabal b/ShellCheck.cabal index e0c9db0..e4a8290 100644 --- a/ShellCheck.cabal +++ b/ShellCheck.cabal @@ -31,6 +31,12 @@ Extra-Source-Files: -- tests test/shellcheck.hs +custom-setup + setup-depends: + base >= 4 && <5, + process >= 1.0 && <1.7, + Cabal >= 1.10 && <2.3 + source-repository head type: git location: git://github.com/koalaman/shellcheck.git @@ -38,7 +44,7 @@ source-repository head library build-depends: base >= 4 && < 5, - containers, + containers >= 0.5, directory, json, mtl >= 2.2.1, @@ -73,9 +79,9 @@ executable shellcheck base >= 4 && < 5, containers, directory, - json, + json >= 0.3.6, mtl >= 2.2.1, - parsec, + parsec >= 3.0, regex-tdfa, QuickCheck >= 2.7.4 main-is: shellcheck.hs From cd7c077ecc690ae378926a36519a6855830f4ac4 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Thu, 8 Mar 2018 19:57:40 +0200 Subject: [PATCH 2/2] Move library into src/ --- ShellCheck.cabal | 3 +++ {ShellCheck => src/ShellCheck}/AST.hs | 0 {ShellCheck => src/ShellCheck}/ASTLib.hs | 0 {ShellCheck => src/ShellCheck}/Analytics.hs | 0 {ShellCheck => src/ShellCheck}/Analyzer.hs | 0 {ShellCheck => src/ShellCheck}/AnalyzerLib.hs | 0 {ShellCheck => src/ShellCheck}/Checker.hs | 0 {ShellCheck => src/ShellCheck}/Checks/Commands.hs | 0 {ShellCheck => src/ShellCheck}/Checks/ShellSupport.hs | 0 {ShellCheck => src/ShellCheck}/Data.hs | 0 {ShellCheck => src/ShellCheck}/Formatter/CheckStyle.hs | 0 {ShellCheck => src/ShellCheck}/Formatter/Format.hs | 0 {ShellCheck => src/ShellCheck}/Formatter/GCC.hs | 0 {ShellCheck => src/ShellCheck}/Formatter/JSON.hs | 0 {ShellCheck => src/ShellCheck}/Formatter/TTY.hs | 0 {ShellCheck => src/ShellCheck}/Interface.hs | 0 {ShellCheck => src/ShellCheck}/Parser.hs | 0 {ShellCheck => src/ShellCheck}/Regex.hs | 0 18 files changed, 3 insertions(+) rename {ShellCheck => src/ShellCheck}/AST.hs (100%) rename {ShellCheck => src/ShellCheck}/ASTLib.hs (100%) rename {ShellCheck => src/ShellCheck}/Analytics.hs (100%) rename {ShellCheck => src/ShellCheck}/Analyzer.hs (100%) rename {ShellCheck => src/ShellCheck}/AnalyzerLib.hs (100%) rename {ShellCheck => src/ShellCheck}/Checker.hs (100%) rename {ShellCheck => src/ShellCheck}/Checks/Commands.hs (100%) rename {ShellCheck => src/ShellCheck}/Checks/ShellSupport.hs (100%) rename {ShellCheck => src/ShellCheck}/Data.hs (100%) rename {ShellCheck => src/ShellCheck}/Formatter/CheckStyle.hs (100%) rename {ShellCheck => src/ShellCheck}/Formatter/Format.hs (100%) rename {ShellCheck => src/ShellCheck}/Formatter/GCC.hs (100%) rename {ShellCheck => src/ShellCheck}/Formatter/JSON.hs (100%) rename {ShellCheck => src/ShellCheck}/Formatter/TTY.hs (100%) rename {ShellCheck => src/ShellCheck}/Interface.hs (100%) rename {ShellCheck => src/ShellCheck}/Parser.hs (100%) rename {ShellCheck => src/ShellCheck}/Regex.hs (100%) diff --git a/ShellCheck.cabal b/ShellCheck.cabal index e4a8290..215e226 100644 --- a/ShellCheck.cabal +++ b/ShellCheck.cabal @@ -42,6 +42,7 @@ source-repository head location: git://github.com/koalaman/shellcheck.git library + hs-source-dirs: src build-depends: base >= 4 && < 5, containers >= 0.5, @@ -77,6 +78,7 @@ library executable shellcheck build-depends: base >= 4 && < 5, + ShellCheck, containers, directory, json >= 0.3.6, @@ -90,6 +92,7 @@ test-suite test-shellcheck type: exitcode-stdio-1.0 build-depends: base >= 4 && < 5, + ShellCheck, containers, directory, json, diff --git a/ShellCheck/AST.hs b/src/ShellCheck/AST.hs similarity index 100% rename from ShellCheck/AST.hs rename to src/ShellCheck/AST.hs diff --git a/ShellCheck/ASTLib.hs b/src/ShellCheck/ASTLib.hs similarity index 100% rename from ShellCheck/ASTLib.hs rename to src/ShellCheck/ASTLib.hs diff --git a/ShellCheck/Analytics.hs b/src/ShellCheck/Analytics.hs similarity index 100% rename from ShellCheck/Analytics.hs rename to src/ShellCheck/Analytics.hs diff --git a/ShellCheck/Analyzer.hs b/src/ShellCheck/Analyzer.hs similarity index 100% rename from ShellCheck/Analyzer.hs rename to src/ShellCheck/Analyzer.hs diff --git a/ShellCheck/AnalyzerLib.hs b/src/ShellCheck/AnalyzerLib.hs similarity index 100% rename from ShellCheck/AnalyzerLib.hs rename to src/ShellCheck/AnalyzerLib.hs diff --git a/ShellCheck/Checker.hs b/src/ShellCheck/Checker.hs similarity index 100% rename from ShellCheck/Checker.hs rename to src/ShellCheck/Checker.hs diff --git a/ShellCheck/Checks/Commands.hs b/src/ShellCheck/Checks/Commands.hs similarity index 100% rename from ShellCheck/Checks/Commands.hs rename to src/ShellCheck/Checks/Commands.hs diff --git a/ShellCheck/Checks/ShellSupport.hs b/src/ShellCheck/Checks/ShellSupport.hs similarity index 100% rename from ShellCheck/Checks/ShellSupport.hs rename to src/ShellCheck/Checks/ShellSupport.hs diff --git a/ShellCheck/Data.hs b/src/ShellCheck/Data.hs similarity index 100% rename from ShellCheck/Data.hs rename to src/ShellCheck/Data.hs diff --git a/ShellCheck/Formatter/CheckStyle.hs b/src/ShellCheck/Formatter/CheckStyle.hs similarity index 100% rename from ShellCheck/Formatter/CheckStyle.hs rename to src/ShellCheck/Formatter/CheckStyle.hs diff --git a/ShellCheck/Formatter/Format.hs b/src/ShellCheck/Formatter/Format.hs similarity index 100% rename from ShellCheck/Formatter/Format.hs rename to src/ShellCheck/Formatter/Format.hs diff --git a/ShellCheck/Formatter/GCC.hs b/src/ShellCheck/Formatter/GCC.hs similarity index 100% rename from ShellCheck/Formatter/GCC.hs rename to src/ShellCheck/Formatter/GCC.hs diff --git a/ShellCheck/Formatter/JSON.hs b/src/ShellCheck/Formatter/JSON.hs similarity index 100% rename from ShellCheck/Formatter/JSON.hs rename to src/ShellCheck/Formatter/JSON.hs diff --git a/ShellCheck/Formatter/TTY.hs b/src/ShellCheck/Formatter/TTY.hs similarity index 100% rename from ShellCheck/Formatter/TTY.hs rename to src/ShellCheck/Formatter/TTY.hs diff --git a/ShellCheck/Interface.hs b/src/ShellCheck/Interface.hs similarity index 100% rename from ShellCheck/Interface.hs rename to src/ShellCheck/Interface.hs diff --git a/ShellCheck/Parser.hs b/src/ShellCheck/Parser.hs similarity index 100% rename from ShellCheck/Parser.hs rename to src/ShellCheck/Parser.hs diff --git a/ShellCheck/Regex.hs b/src/ShellCheck/Regex.hs similarity index 100% rename from ShellCheck/Regex.hs rename to src/ShellCheck/Regex.hs