Closed sasq64 closed 10 months ago
Please tell me the lint tool and how to run it and its output example. I will add a feature to support it.
I am writing my own linter for a language called miniscript, which we use from Unity.
Since I control the output I can adapt it to whatever any-lint wants.
I guess the best way is if format
could contain ${severity}
, which must match one of the severity strings as used by the configuration.
I published 0.2.1 which supports severity placeholder and selector. If you have any trouble in new configuration, please re-open this issue.
I don't understand how the severityMap
works. Just adding a severity like 'warning' or 'error' to the lint output and adding ${severity}
doesn't seem to be enough?
Tried this too;
"severityMap": { "error": "error", "warning": "warning"},
"format": "${file}:${startLine}:${startColumn}:${endColumn}:${severity} ${message}"
Yes, it is enough in your case without severityMap
.
However, some linter severity is not error
or warning
but 2
or 1
like eslint.
In this case, severityMap
is required to map severity to vscode-any-lint's severity.
But I cant get it to work with or without severityMap...
It doesnt use the severity and also doesn't parse the message.
Example output of the linter:
scripts/util.ms:26:5:6:warning Unknown function 'x'
Please show the linter output example.
I did :)
From VSCode it looks like only the last word is put into message
.
So I suspect in the example above, I get;
severity = "warning unknown function" message = "'x'"
Yes that was it. I changed the format to:
"format": "${file}:${startLine}:${startColumn}:${endColumn}:${severity}:${message}"
and the output accordingly, and it works (at least until there is a colon in the error message)
Yes, string placeholder is just replaced to .*
in regexp token.
So, some special characters or format are necessary to match correctly.
I would like to have different severities for different errors in the same report.