-
-
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
Add hlint #106
Add hlint #106
Conversation
There was a problem hiding this 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.
lua/lint/linters/hlint.lua
Outdated
["start"] = { line = item.startLine, character = item.startColumn }, | ||
["end"] = { line = item.endLine, character = item.endColumn }, | ||
}, | ||
severity = vim.lsp.protocol.DiagnosticSeverity.Error, |
There was a problem hiding this comment.
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": [],
There was a problem hiding this comment.
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?
This reverts commit 96d1f20.
Let me update the failing test. |
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.