Make some warnings more severe
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 1.6k
- Forks
- 210
- PR merge metrics
- No merged PRs in 30d
Description
I think a few of our warnings need to be made more severe by default, in particular those where a non-fixed part of the expression is discarded, implying that the programmer meant something other than what the expression is actually equivalent to. For example, someone who writes sum (x,y,z) probably meant x+y+z even though it's really equivalent to just z. Similarly, someone who writes x <* pure True probably meant x *> pure True, even though it's really equivalent to just x. The common theme I see here is that if you ever get one of these, its meaning is probably less "this code can be simplified" and more "this code doesn't do what you think it does". What do you think of bumping these sorts of things up to errors, or maybe adding some "severe warning" entry in between warnings and errors, and also inhibiting refactor from automatically "fixing" them?
Contributor guide
No contributing guide indexed for this repository
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
The issue names no files or tests; start by locating how HLint warning severity and automatic refactoring are defined, then trace the examples sum (x,y,z) and x <* pure True. Done requires an agreed policy for severe warnings or errors and whether refactoring should be inhibited.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100