aboutsummaryrefslogtreecommitdiffstats
path: root/app/Issue.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Issue.hs')
-rw-r--r--app/Issue.hs12
1 files changed, 2 insertions, 10 deletions
diff --git a/app/Issue.hs b/app/Issue.hs
index e6515a9..54ef5e4 100644
--- a/app/Issue.hs
+++ b/app/Issue.hs
@@ -3,7 +3,7 @@ module Issue
Provenance (..),
fromMatch,
id,
- getIssuesPar,
+ getIssues,
)
where
@@ -22,7 +22,6 @@ import Issue.Provenance (Provenance (..), commitFromHEAD)
import Issue.Tag (Tag (..))
import Issue.Tag qualified as I
import Issue.Text qualified as I
-import Parallel (parMapM)
import Process (proc, sh)
import System.FilePath (takeExtension)
import System.Process.Typed (setWorkingDir)
@@ -102,13 +101,9 @@ stripIssueMarkers text =
-- | Get all issues in the given directory and files. Runs
-- parallelized.
-getIssuesPar :: FilePath -> [FilePath] -> IO [[Issue]]
-getIssuesPar cwd files =
- parMapM (handle forgetGetIssuesExceptions . getIssues cwd) files
-
-- | Get all issues in the given directory and file.
getIssues :: FilePath -> FilePath -> IO [Issue]
-getIssues cwd filename = do
+getIssues cwd filename = handle (\(_ :: E.UnknownFileExtension) -> pure []) $ do
let extension = takeExtension filename
treeGrepperLanguage =
-- TODO Add support for all tree-grepper supported files
@@ -151,6 +146,3 @@ getIssues cwd filename = do
fixTreeGrepper :: G.Result -> G.Result
fixTreeGrepper treeGrepperResult =
treeGrepperResult {G.matches = G.merge treeGrepperResult.matches}
-
-forgetGetIssuesExceptions :: E.UnknownFileExtension -> IO [a]
-forgetGetIssuesExceptions _ = pure []