typelevel / typelevel/typelevel-scalafix
Add warning for `fa.map(g).as(x)` or `fa.map(g).void`
Open
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 27
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Accidentally using .as or .void after a .map is currently an undetectable category of bug, and it's a common and easy mistake to make (the former map should probably be a flatMap)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing Scalafix rules and tests for method chains involving map, as, or void. Confirm how warnings are expressed and tested, then cover fa.map(g).as(x) and fa.map(g).void so the accidental map usage is reported. Done means the warning behavior is exercised by regression tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100