krank 0.2.1 → 0.2.2
raw patch · 5 files changed
+42/−4 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Version: displayVersion :: String
Files
- CHANGELOG.md +10/−0
- app/Main.hs +11/−2
- krank.cabal +4/−1
- src/Krank/Checkers/Ignore.hs +1/−1
- src/Version.hs +16/−0
CHANGELOG.md view
@@ -1,5 +1,15 @@ # Revision history for krank +## 0.2.2 -- 2020-06-30++* #84 fix build with `unordered-containers` 0.2.11.0+* #81, new `--version` command line argument++## 0.2.1 -- 2020-05-02++* #76 fix. ignore space in URL+* Output now includes the issue title.+ ## 0.2.0 -- 2020-04-19 * GHC 8.10 support
app/Main.hs view
@@ -14,6 +14,7 @@ import System.Console.Pretty (supportsPretty) import System.Exit (exitFailure) import Text.Regex.PCRE.Heavy+import Version (displayVersion) data KrankOpts = KrankOpts@@ -58,6 +59,14 @@ <> Opt.help "Disable colored outputs" ) +versionParse :: Opt.Parser (a -> a)+versionParse =+ Opt.infoOption+ displayVersion+ ( Opt.long "version"+ <> Opt.help "Displays the version of the program"+ )+ optionsParser :: Opt.Parser KrankOpts optionsParser = KrankOpts@@ -75,7 +84,7 @@ opts :: Opt.ParserInfo KrankOpts opts = Opt.info- (optionsParser <**> Opt.helper)+ (optionsParser <**> Opt.helper <**> versionParse) ( Opt.fullDesc <> Opt.progDesc "Checks the comments in FILES" <> Opt.header "krank - a comment linter / analytics tool"@@ -84,7 +93,7 @@ main :: IO () main = do canUseColor <- supportsPretty- config <- Opt.execParser opts+ config <- Opt.customExecParser (Opt.prefs Opt.showHelpOnError) opts let kConfig = (krankConfig config) { useColors = useColors (krankConfig config) && canUseColor
krank.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: krank-version: 0.2.1+version: 0.2.2 synopsis: Krank checks your code source comments for important markers -- description: bug-reports: https://github.com/guibou/krank/issues@@ -38,6 +38,7 @@ library import: shared-library+ autogen-modules: Paths_krank exposed-modules: Krank Krank.Checkers.Ignore Krank.Checkers.IssueTracker@@ -47,6 +48,8 @@ Utils.Github Utils.Gitlab Utils.Req+ Version+ other-modules: Paths_krank test-suite krank-test import: shared-library
src/Krank/Checkers/Ignore.hs view
@@ -9,7 +9,7 @@ import qualified Data.ByteString.Char8 as ByteString import Data.ByteString.Char8 (ByteString)-import Data.HashMap.Strict as HashM+import qualified Data.HashMap.Strict as HashM import qualified Data.List as DataL import Krank.Types import PyF (fmt)
+ src/Version.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE QuasiQuotes #-}++module Version+ ( displayVersion,+ )+where++import Data.Version (showVersion)+import Paths_krank (version)+import PyF (fmt)++getVersion :: String+getVersion = showVersion version++displayVersion :: String+displayVersion = [fmt|Krank {getVersion}|]