ndmitchell / ndmitchell/hlint

Expose the exhaustive list of hints

Open
#622 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haskell
Stars
1.6k
Forks
210
PR merge metrics
No merged PRs in 30d

Description

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:

  • Technical name (a.k.a. "Key name" in Sonar), e.g. Use second (field hint)
  • Display name. Given your hints are already pretty, I can reuse the same here.
  • Description (ideally in HTML format, but anything would do)
  • Severity (same as your severity field)
  • Type (possible values in Sonar are CODE_SMELL | BUG | VULNERABILITY. I can work out a mapping from Hlint decl field I guess.

I would really appreciate if you could provide me with anything to help this project.

Thank you!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing HLint's existing hlint.yaml generation and the hint definitions it already exposes. Determine how a version-specific exhaustive rule listing could provide the requested technical name, display name, description, severity, and type, then verify that the output covers every lint rule.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.