-
Notifications
You must be signed in to change notification settings - Fork 195
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
Expose the exhaustive list of hints #622
Comments
See #562 which has a lot of overlap to this. For type, HLint only gives |
Thanks for your answers! In case it's possible to improve things, an example would be great. Maybe also explain why something is bad (e.g. for performance / readability) but this would be bonus! I started toying with
I guess these are test values? I'm not sure anything can be extracted from it. Some look good on the description (which is also the technical name
The I see the first word is As for the type, I think for a first version, it's cool to flag all rules as I also find duplicates:
I could filter on the technical name (e.g. That being said, would you mind explaining why this is hard to build an exhaustive list of Hlint rules? Is there anything a newbie/intermediate in Haskell could do/contribute to improve the situation? (I won't get offended if you reply "Nope, it's too complicated for you", no worries 😄 ). Again, thanks for the help! |
I don't know why things are bad for each hint (I don't record it), but it's pretty much always readability. Correct, things like "Use bad" are test values. I've eliminated them - just pushed. The found/perhaps is indeed an example of something that triggers. Error/Warning/Hint are reasonable for severity. There are definitely duplicates, do dedupe them. It's hard to build an exhaustive list of hints because they are functions that take expressions and returns hints, so it's not like there is a function for each hint. That said, I suspect that anything that isn't tested is broken, so hopefully we can get close to an exhaustive list with the test approach. |
Hi,
First off, thank you for this linter, it's really useful for both my personal and professional projects! It helps me both keeping my code clean and learning new things.
I was wondering if there's a (ideally easy) way to extract the exhaustive list of hints that Hlint can return?
My use case: I'm maintaining a Sonar plugin for Haskell which needs to have at compile time the exhaustive list of lint rules (they must be packaged as XML inside the plugin JAR).
While I could browse all your code and list them manually, would you have any way to ease (ideally automate based on an Hlint version) this automation please?
I don't mind having to write a converter from whatever structure (JSON / XML / you name it) to my actual Sonar XML structure.
Thanks in advance and sorry if there's already such a thing! I hoped to be able to use the generation of
hlint.yaml
but unfortunately this is not what I expected.Information I need for each lint rule:
Use second
(fieldhint
)severity
field)CODE_SMELL | BUG | VULNERABILITY
. I can work out a mapping from Hlintdecl
field I guess.I would really appreciate if you could provide me with anything to help this project.
Thank you!
The text was updated successfully, but these errors were encountered: