Duplication hints can't be ignored on the function level
Open
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 1.6k
- Forks
- 210
- PR merge metrics
- No merged PRs in 30d
Description
$ hlint --version
HLint v2.0.9, (C) Neil Mitchell 2006-2017
fun = do
do
g
h
i
do
g
h
i
{-# ANN fun ("HLint: ignore Reduce duplication" :: String) #-}
=>
test.hs:3:5: Suggestion: Reduce duplication
Found:
g
h
i
Why not:
Combine with test.hs:7:5
1 hint
If i change the annotation to module instead of fun the warning is ignored as I expect. I also tried placing the fun annotation on top of the function without luck.
Is this a bug or am I making a mistake?
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
Reproduce the report with HLint v2.0.9 using the shown function and annotation, then trace how module-level and function-level ANN annotations are handled for the “Reduce duplication” hint. Done means the function-level annotation suppresses that hint just as the module-level annotation does.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100