Skip to content

Apply hlint suggestions with a single count #11093

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

Merged
merged 1 commit into from
Aug 2, 2025

Conversation

philderbeast
Copy link
Collaborator

@philderbeast philderbeast commented Jul 23, 2025

See #9110. Apply hlint suggestions with a single count so that these warnings are no longer ignored and will be picked up by our CI linting.

I left one or two single count warnings that didn't have a small diff or that I didn't think would be otherwise easy to review.

Each applied suggestion is an individual commit but I'll squash these if this pull request is approved.

When reviewing #8889, we noticed that plenty of hlint suggestions were being ignored in .hlint.yaml that would have been triggered for new modules and new code of #8889.


  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

Copy link
Collaborator

@geekosaur geekosaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am mostly relying on ghc here, with some spot checks: if the result compiles it is most probably correct. (Almost all failures with applying hlint suggestions involve things like the result having an ambiguous type, because hlint works by source heuristics and doesn't know about types at all.)

@philderbeast
Copy link
Collaborator Author

I am mostly relying on ghc here

Yes me too. I cabal repl and eyeball each change.

@philderbeast philderbeast force-pushed the hlint/onesies branch 2 times, most recently from 06b4a14 to dc5c969 Compare July 30, 2025 11:04
- Follow hlint suggestion: Use isJust
- Follow hlint suggestion: Use isNothing
- Follow hlint suggestion: Redundant ==
- Follow hlint suggestion: Redundant fmap
- Follow hlint suggestion: Use minimumBy
- Follow hlint suggestion: Use lefts
- Follow hlint suggestion: Use fromRight
- Follow hlint suggestion: Use for
- Follow hlint suggestion: Use forM_
- Follow hlint suggestion: Use when
- Follow hlint suggestion: Use uncurry
- Follow hlint suggestion: Use traverse
- Follow hlint suggestion: Use ?~
- Follow hlint suggestion: Fuse traverse_/map
- Follow hlint suggestion: Fuse traverse_/fmap
- Follow hlint suggestion: Use replicateM
- Follow hlint suggestion: Missing NOINLINE pragma
- Rerun hlint --default
- Redo hlint counts after rebase
- Use Data.Foldable.minimumBy

Co-Authored-By: ˌbodʲɪˈɡrʲim <andrew.lelechenko@gmail.com>
@philderbeast philderbeast added merge me Tell Mergify Bot to merge and removed attention: needs-review labels Jul 31, 2025
@mergify mergify bot added ready and waiting Mergify is waiting out the cooldown period merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days labels Jul 31, 2025
mergify bot added a commit that referenced this pull request Aug 2, 2025
@mergify mergify bot merged commit 9b26df8 into haskell:master Aug 2, 2025
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge ready and waiting Mergify is waiting out the cooldown period
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants