packages feed

lentil 0.1.8.0 → 0.1.9.0

raw patch · 19 files changed

+50/−19 lines, 19 filesdep ~optparse-applicative

Dependency ranges changed: optparse-applicative

Files

changes.txt view
@@ -1,3 +1,10 @@+0.1.9.0+-------++- Released Mon 25 Jan 2016 12:43:48 CET+- by default, lentil will not recurse on dot folders (directories starting+  with '.' and '_') (request by Artyom).+ 0.1.8.0 ------- 
doc/usr/page.rst view
@@ -89,8 +89,9 @@ You can specify more than one folder/path with ``lentil foldera folderb ...`` or exclude folders/paths with ``lentil . -x foldera/sub``. -lentil scans directory recursively, not following symlinks. Current working-directory is indicated by a single dot (``.``).+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 (``.``).  .. raw:: html 
lentil.cabal view
@@ -1,5 +1,5 @@ name:                lentil-version:             0.1.8.0+version:             0.1.9.0 synopsis:            frugal issue tracker description:         minumum effort, cohesive issue tracker based on                      ubiquitous @TODO@s and @FIXME@s conventions.@@ -30,11 +30,14 @@                      test/test-files/lang-comm/text.txt,                      test/test-files/specific/contiguous.c,                      test/test-files/specific/uppercase.C,-                     test/test-files/test-proj/fold-a/foo1.hs,-                     test/test-files/test-proj/fold-b/foo2.hs,-                     test/test-files/test-proj/fold-c/foo3.hs,-                     test/test-files/test-proj/fold-c/sub-fold/foo4.hs,-                     test/test-files/test-proj/fold-c/sub-fold/foo5.hs+                     test/test-files/test-proj/base-case/fold-a/foo1.hs,+                     test/test-files/test-proj/base-case/fold-b/foo2.hs,+                     test/test-files/test-proj/base-case/fold-c/foo3.hs,+                     test/test-files/test-proj/base-case/fold-c/sub-fold/foo4.hs,+                     test/test-files/test-proj/base-case/fold-c/sub-fold/foo5.hs,+                     test/test-files/test-proj/dot-folders/foo1.hs,+                     test/test-files/test-proj/dot-folders/.alfa/foo1.hs,+                     test/test-files/test-proj/dot-folders/_beta/foo1.hs extra-doc-files:     README, changes.txt, doc/usr/page.rst, doc/usr/test.zip,                      issues.txt, contributors.txt cabal-version:       >=1.10@@ -42,7 +45,7 @@  executable lentil   main-is:             Main.hs-  build-depends:       base >=4.7 && <4.9, optparse-applicative >=0.11 && <0.12,+  build-depends:       base >=4.7 && <4.9, optparse-applicative >=0.12 && <0.13,                        regex-tdfa >=1.2 && <1.3, natural-sort >=0.1 && <0.2,                        parsec >=3.1 && <3.2, filepath >=1.3 && <1.5,                        directory >=1.2 && <1.3, filemanip >=0.3 && <0.4,@@ -59,7 +62,7 @@   ghc-options:         -Wall   HS-Source-Dirs:      test, src   main-is:             Tests.hs-  build-depends:       base >=4.7 && <4.9, optparse-applicative >=0.11 && <0.12,+  build-depends:       base >=4.7 && <4.9, optparse-applicative >=0.12 && <0.13,                        regex-tdfa >=1.2 && <1.3, natural-sort >=0.1 && <0.2,                        parsec >=3.1 && <3.2, filepath >=1.3 && <1.5,                        directory >=1.2 && <1.3, filemanip >=0.3 && <0.4,
src/Lentil/File.hs view
@@ -45,7 +45,7 @@ findIssues :: [Alias] -> [FilePath] -> [FilePath] -> IO [Issue] findIssues as is xs = mapM fc is >>= (issueFinder as) . concat     where-          fc i = find always (findClause (xs' i)) i+          fc i = find recPred (findClause (xs' i)) i            xs' "." = map (combine ".") xs -- trick to exclude on '.'           xs' _   = xs@@ -60,6 +60,15 @@           fp2fc f = Any . L.isPrefixOf f <$> filePath           -- TODO: combine funziona su windows? [feature:intermediate] ++-- recursion predicate: excludes dot ('.') or _ folders+recPred :: RecursionPredicate+recPred = (not . isDotFolder) <$> fileName+    where+          isDotFolder "." = False -- not curr dir!+          isDotFolder fp  | length fp == 0              = False+                          | L.elem (head fp) ['.', '_'] = True+          isDotFolder _   = False  -- -- canonicalizePath with exceptions to stderr -- canonPaths :: [FilePath] -> IO [FilePath]
src/Main.hs view
@@ -28,7 +28,7 @@                                    short 'v'      <>                                    help "show version and copyright info" )     where-          versionCopy = "lentil - frugal issue tracker, version 0.1.8.0\n\+          versionCopy = "lentil - frugal issue tracker, version 0.1.9.0\n\                         \(C) 2015 Francesco Ariis - http://www.ariis.it\n\                         \released under the GNU General Public License v3\n" 
test/Lentil/FileSpec.hs view
@@ -9,8 +9,11 @@ main :: IO () main = hspec spec +fld :: String+fld = "test/test-files/test-proj/"+ bas :: String-bas = "test/test-files/test-proj/"+bas = fld ++ "base-case/"  spec :: Spec spec = do@@ -42,11 +45,14 @@       findIssues [] [bas ++ "fold-c/"]                  [bas ++ "fold-c/sub-fold/"] >>= \fiss ->       length fiss `shouldBe` 1+    it "exludes . and _ folders" $+      findIssues [] [fld ++ "dot-folders/"] [] >>= \fiss ->+      length fiss `shouldBe` 1     it "doesn't crash on wrong file" $       findIssues [] [bas ++ "zxczd"] [] >>= \fiss ->       length fiss `shouldBe` 0     it "does search outside $PWD" $       findIssues [] [bas] []                    >>= \fiss  ->-      findIssues [] [bas ++ "../test-proj/"] [] >>= \fiss' ->+      findIssues [] [bas ++ "../base-case/"] [] >>= \fiss' ->       length fiss `shouldBe` length fiss' 
+ test/test-files/test-proj/base-case/fold-a/foo1.hs view
@@ -0,0 +1,1 @@+fac' c = product [1..c] -- TODO: sometodo [t]
+ test/test-files/test-proj/base-case/fold-b/foo2.hs view
@@ -0,0 +1,1 @@+-- TODO: sometodo [t]
+ test/test-files/test-proj/base-case/fold-c/foo3.hs view
@@ -0,0 +1,1 @@+-- TODO: sometodo [t]
+ test/test-files/test-proj/base-case/fold-c/sub-fold/foo4.hs view
@@ -0,0 +1,1 @@+-- TODO: sometodo [t]
+ test/test-files/test-proj/base-case/fold-c/sub-fold/foo5.hs view
@@ -0,0 +1,1 @@+-- TODO: sometodo [t]
+ test/test-files/test-proj/dot-folders/.alfa/foo1.hs view
@@ -0,0 +1,1 @@+fac' c = product [1..c] -- TODO: sometodo [t]
+ test/test-files/test-proj/dot-folders/_beta/foo1.hs view
@@ -0,0 +1,1 @@+fac' c = product [1..c] -- TODO: sometodo [t]
+ test/test-files/test-proj/dot-folders/foo1.hs view
@@ -0,0 +1,3 @@+fac' c = product [1..c] -- TODO: sometodo [t]++-- warning: there are two hidden dot-folders in this directory
− test/test-files/test-proj/fold-a/foo1.hs
@@ -1,1 +0,0 @@-fac' c = product [1..c] -- TODO: sometodo [t]
− test/test-files/test-proj/fold-b/foo2.hs
@@ -1,1 +0,0 @@--- TODO: sometodo [t]
− test/test-files/test-proj/fold-c/foo3.hs
@@ -1,1 +0,0 @@--- TODO: sometodo [t]
− test/test-files/test-proj/fold-c/sub-fold/foo4.hs
@@ -1,1 +0,0 @@--- TODO: sometodo [t]
− test/test-files/test-proj/fold-c/sub-fold/foo5.hs
@@ -1,1 +0,0 @@--- TODO: sometodo [t]