Skip to content
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

Add hlint #106

Merged
merged 7 commits into from
Oct 27, 2021
Merged

Add hlint #106

merged 7 commits into from
Oct 27, 2021

Conversation

dycw
Copy link
Contributor

@dycw dycw commented Oct 23, 2021

Screenshot from 2021-10-23 23-04-58

P.S. It appears my formatter has gone and prettier-ified the README. If you're against this I'd be happy to undo this.

Copy link
Owner

@mfussenegger mfussenegger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P.S. It appears my formatter has gone and prettier-ified the README. If you're against this I'd be happy to undo this.

yes please revert the unrelated formatting changes.

["start"] = { line = item.startLine, character = item.startColumn },
["end"] = { line = item.endLine, character = item.endColumn },
},
severity = vim.lsp.protocol.DiagnosticSeverity.Error,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output has a severity property - that could be used here to avoid reporting everything as errors.

 hlint --json Foo.hs | jq
[
  {
    "module": [
      "Main"
    ],
    "decl": [
      "foo"
    ],
    "severity": "Warning",
    "hint": "Use concatMap",
    "file": "Foo.hs",
    "startLine": 110,
    "startColumn": 10,
    "endLine": 110,
    "endColumn": 28,
    "from": "concat (map op xs)",
    "to": "concatMap op xs",
    "note": [],

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, missed this. According this there's 3 levels, but they're all in Title case (also evident in your example). Is it gonna be ok?

@dycw
Copy link
Contributor Author

dycw commented Oct 24, 2021

Let me update the failing test.

@mfussenegger mfussenegger merged commit 24a085b into mfussenegger:master Oct 27, 2021
@dycw dycw deleted the add-hlint branch October 28, 2021 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants