From a2f401ca9839b6041b7d94f77de4530f168b12ad Mon Sep 17 00:00:00 2001 From: Fabian Kirchner Date: Wed, 6 Mar 2024 13:47:17 +0100 Subject: review(feature/review): approve lgtm, possible splitting some non-business-logic stuff into separate commits would be nice commit 9a49ec0dcd6f75736949350844f85d80fe48a662 --- app/Git.hs | 1 + app/Git/CommitHash.hs | 1 + app/Main.hs | 1 + 3 files changed, 3 insertions(+) diff --git a/app/Git.hs b/app/Git.hs index 7859503..fd4fa53 100644 --- a/app/Git.hs +++ b/app/Git.hs @@ -96,6 +96,7 @@ readTextFileOfText = readTextFileOf LT.readFile LT.decodeUtf8 readTextFileOfBS :: CommitHash -> FilePath -> IO LB.ByteString readTextFileOfBS = readTextFileOf LB.readFile (\x -> x) +-- REVIEW Suggestion: we could use `id` instead of `\x -> x` readTextFileOf :: (FilePath -> IO a) -> (LB.ByteString -> a) -> CommitHash -> FilePath -> IO a readTextFileOf readFile _ WorkingTree filePath = diff --git a/app/Git/CommitHash.hs b/app/Git/CommitHash.hs index 0caecf4..c53e2d8 100644 --- a/app/Git/CommitHash.hs +++ b/app/Git/CommitHash.hs @@ -28,6 +28,7 @@ toTextUnsafe :: CommitHash -> T.Text toTextUnsafe (Commit hash) = hash toTextUnsafe _ = error "toTextUnsafe: WorkingDir" +-- REVIEW Why is this unsafe? instance P.Render CommitHash where render = P.render . P.Detailed diff --git a/app/Main.hs b/app/Main.hs index 5d29923..a28f4a6 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -610,6 +610,7 @@ main = do featureBranch ".anissue/status" S.continueReview +-- REVIEW Why is withReviewing in the Status module and not the Review module? Options {colorize, noPager, width, command = List {sort, filters, files, group = Just group, closed}} -> do ungroupedIssues <- I.applySorts sort -- cgit v1.2.3