packages feed

lentil 0.1.9.0 → 0.1.10.0

raw patch · 9 files changed

+49/−41 lines, 9 files

Files

changes.txt view
@@ -1,3 +1,10 @@+0.1.10.0+--------++- Released Tue 23 Feb 2016 22:57:20 CET+- added a new flag word "feature" (patch by Michał Antkiewi).+- bumped up copyright year.+ 0.1.9.0 ------- @@ -160,4 +167,3 @@  - Released Tue 09 Jun 2015 21:05:33 CEST - Added changes.txt as changelog-
contributors.txt view
@@ -1,5 +1,6 @@ (in alphabetical order) +Michał Antkiewi Francesco Ariis Francesco Mazzoli Simon Michael
doc/usr/page.rst view
@@ -90,8 +90,8 @@ or exclude folders/paths with ``lentil . -x foldera/sub``.  lentil scans directory recursively, not following symlinks, hidden folders-(``.git``, ``.cabal``, etc.) or folders starting with a ``_``. Current-working directory is indicated by a single dot (``.``).+(``.git``, ``.cabal``, etc.) or folders starting with an underscore (``_``).+Current working directory is indicated by a single dot (``.``).  .. raw:: html 
issues.txt view
@@ -31,6 +31,7 @@     35  win (and mac?) builds [package] [u:3] [2016]     36  Henning: don't output nothing on lentil xxx.cabal (maybe add 19         skipped?) [request] [2016]+    37  code coverage [test]   src/Lentil/Args.hs     25  disambiguation optparse-applicative [feature:intermediate]@@ -60,11 +61,3 @@ src/Main.hs     41  leave sort out as now? [design]     58  o ord? [fixme]- -test/Lentil/ArgsSpec.hs-    37  real parsing testing options [test]- -test/Tests.hs-     4 -   http://hackage.haskell.org/package/mockery-0.3.0/docs/Test-Mockery-Directory.html-   instead of folder use this? [refactor]
lentil.cabal view
@@ -1,5 +1,5 @@ name:                lentil-version:             0.1.9.0+version:             0.1.10.0 synopsis:            frugal issue tracker description:         minumum effort, cohesive issue tracker based on                      ubiquitous @TODO@s and @FIXME@s conventions.@@ -9,10 +9,10 @@ license-file:        LICENSE author:              Francesco Ariis <fa-ml@ariis.it> maintainer:          Francesco Ariis <fa-ml@ariis.it>-copyright:           © 2015 Francesco Ariis+copyright:           © 2015-2016 Francesco Ariis category:            Development build-type:          Simple-tested-with:         GHC==7.10.1, GHC==7.8.3+tested-with:         GHC==7.10.3, GHC==7.10.1, GHC==7.8.3 extra-source-files:  stack.yaml,                      test/test-files/lang-comm/xyz.xyz,                      test/test-files/lang-comm/clang.c,
src/Lentil/Parse/Issue.hs view
@@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Lentil.Parse.Issue--- Copyright   :  © 2015 Francesco Ariis+-- Copyright   :  © 2015-2016 Francesco Ariis, Michał Antkiewi -- License     :  GPLv3 (see the LICENSE file) -- -- Issues parsing from comments@@ -16,6 +16,7 @@ import Control.Applicative hiding ( (<|>), optional, many )  import qualified Data.Char as C+import qualified Data.String as S  import Prelude -- 7.8 hack @@ -26,22 +27,34 @@  type ParIssue a = Parsec String () a +-- TODO: "feature" flagword could (in theory) clash with a free-text comment+--       (if it is present in the middle of a sentence at the beginning+--       of a line). Consider alternatives (as: making new words+--       configurable in .lentil dotfile [design] [u:2] [bug]+ -- issue flagword-data FlagWord = Todo | Fixme | Xxx deriving (Show, Enum, Eq)+data FlagWord = Todo | Fixme | Xxx | Feature deriving (Enum, Eq) -fw2s :: FlagWord -> String-fw2s Todo  = "todo"-fw2s Fixme = "fixme"-fw2s Xxx   = "xxx" -s2fw :: String -> FlagWord-s2fw s = case map C.toLower s of-           "todo"  -> Todo-           "fixme" -> Fixme-           "xxx"   -> Xxx-           e       -> error ("unrecognised fw: " ++ e)+instance Show FlagWord where+  show Todo    = "todo"+  show Fixme   = "fixme"+  show Xxx     = "xxx"+  show Feature = "feature" +-- top-level constant to evaluate once+flagWords :: [String]+flagWords = map show (enumFrom Todo) +instance S.IsString FlagWord where+  fromString s = case map C.toLower s of+    "todo"    -> Todo+    "fixme"   -> Fixme+    "xxx"     -> Xxx+    "feature" -> Feature+    e         -> error ("unrecognised flag word: " ++ e)++ --------------- -- PRIMITIVE -- ---------------@@ -110,10 +123,8 @@           return fw           <?> "incipit"     where-          flagWords = map fw2s (enumFrom Todo)--          fwpar = choice (map ciString flagWords) >>=-                  return . s2fw+          fwpar = choice (map (try . ciString) flagWords) >>=+                  return . S.fromString   ------------@@ -129,7 +140,7 @@ issue :: ParIssue Issue issue = (mkIssue <$> incipit                  <*> fmap sourceName getPosition-                 <*> (fmap sourceLine getPosition)+                 <*> fmap sourceLine getPosition                  <*> option [] (try tags)                  <*> freeText                  <*> option [] (try tags))@@ -138,7 +149,7 @@           mkIssue fw fp ln tg1 ds tg2 = Issue fp ln ds (addTag fw (tg1++tg2))            addTag Todo tgs = tgs-          addTag fw   tgs = (Tag $ fw2s fw) : tgs+          addTag fw   tgs = (Tag $ show fw) : tgs   @@ -166,4 +177,3 @@ issues :: ParIssue [Issue] issues = many (try $ manyTill anyChar (lookAhead $ try incipit) *> issue)          <?> "issues"-
src/Main.hs view
@@ -16,7 +16,7 @@ main = execParser opts >>= runLentil     where opts = info (helpOvert <*> lOpts <* version)             ( fullDesc <>-              header "lentil - a frugal issue tracker" )+              header "lentil - frugal issue tracker" )  -- overt help text (even in condensed help) helpOvert :: Parser (a -> a)@@ -28,8 +28,8 @@                                    short 'v'      <>                                    help "show version and copyright info" )     where-          versionCopy = "lentil - frugal issue tracker, version 0.1.9.0\n\-                        \(C) 2015 Francesco Ariis - http://www.ariis.it\n\+          versionCopy = "lentil - frugal issue tracker, version 0.1.10.0\n\+                        \(C) 2015-2016 Francesco Ariis - http://www.ariis.it\n\                         \released under the GNU General Public License v3\n"  @@ -60,4 +60,3 @@                  Csv    -> outFunction (issues2CSV fil)                  Comp   -> outFunction (issues2Compiler fil)                  Xml    -> outFunction (issues2Xml fil)-
stack.yaml view
@@ -1,5 +1,3 @@-resolver: lts-3.7+resolver: lts-5.4 packages: - '.'-extra-deps:-- natural-sort-0.1.2
test/Lentil/Parse/IssueSpec.hs view
@@ -15,7 +15,7 @@ -- simple parser (choosable if we are at begin of line or else) sp :: ParIssue a -> String -> Maybe a sp p cs = either (const Nothing) Just-                    (runParser p () fp cs)+                 (runParser p () fp cs)     where fp = "<f>"  @@ -60,6 +60,7 @@        do sp incipit "\n TODO: "  `shouldBe` Just Todo           sp incipit "\n FIXME: "  `shouldBe` Just Fixme           sp incipit "\nXXX: "  `shouldBe` Just Xxx+          sp incipit "\n Feature: "  `shouldBe` Just Feature     it "doesn't work without previous newline" $       sp incipit "\nTODO:some"  `shouldBe` Nothing     it "doesn't work with longer matches (todoodle)" $