Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove empty haddocks and remove empty comments. #1459

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Need to sort comments by line
  • Loading branch information
philderbeast committed Aug 3, 2024
commit c863c27b386a117f3b5d3ddbe462822e1d61a2d5
5 changes: 4 additions & 1 deletion src/Hint/Comment.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ commentRuns m =
traceShow (map (map commentText) xs)
xs
where
-- Comments need to be sorted by line number for detecting runs of single
-- line comments but @ghcComments@ doesn't always do that even though most
-- of the time it seems to.
comments :: [LEpaComment]
comments = ghcComments m
comments = sortOn (\(L (anchor -> span) _) -> srcSpanStartLine span) $ ghcComments m

xs =
foldl'
Expand Down