Closed mgzenitech closed 1 month ago
lines
format does not support capturing by non reserved key currently.
If your linter can emit output with json
or yaml
format, please try it.
lines
format does not support capturing by non reserved key currently. If your linter can emit output withjson
oryaml
format, please try it.
there's only lines format nothing else. Will you add ID support for lines?
there's also question for you in https://github.com/dotenv-linter/dotenv-linter/issues/803
OK, I will add support capturing by user defined placeholder in the next update.
I've released 0.3.0
to support user defined placeholders.
I don't have an environment to run dotenv-linter but have confirmed by simple echo linter.
{
"name": "cmd",
"binPath": "cmd",
"condition": "$.fileExtname == '.go'",
"on": [
"save"
],
"args": [
"/c",
"echo",
"F:\\work\\temp\\proto\\main.go:1 SpaceCharacter: The line has spaces around equal sign",
],
"diagnostic": {
"output": "stdout",
"type": "lines",
"format": "${file}:${startLine} ${ruleId}: ${message}",
"actions": [
{
"type": "openUri",
"title": "`Open ${$$.ruleId} rule document page`",
"uri": "`https://dotenv-linter.github.io/#/checks/${$$.ruleId.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase()}`"
}
]
}
}
superb :) once I'm finished with complete config for dotenv-lint I'll add PR for whole example in the folder ;)
@tamayika something's up with new version as in any-lint output I get infinite loop of errors:
Invalid host defined options
TypeError: Invalid host defined options
at Object.importModuleLoader (/home/marius/.vscode-oss/extensions/tamayika.vscode-any-lint-0.3.0/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.js:1:6461)
at Ve (/home/marius/.vscode-oss/extensions/tamayika.vscode-any-lint-0.3.0/node_modules/quickjs-emscripten-core/dist/index.js:6:4292)
/home/marius/Documents/Projects/zenitech/prototype-generic-vscode
poetry poe lint:dotenv -f extension-output-tamayika.vscode-any-lint-#1-any-lint
config:
"any-lint.linters": [
{
"args": [
"poe",
"lint:dotenv",
"-f",
"${file}"
],
"binPath": "poetry",
"condition": "$.fileExtname.endsWith('.env')",
"cwd": "${workspaceFolder}",
"diagnostic": {
"actions": [
{
"title": "`Open ${$$.ruleId} rule document page`",
"type": "openUri",
// eslint-disable-next-line @stylistic/js/max-len
"uri": "`https://dotenv-linter.github.io/#/checks/${$$.ruleId.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase()}`"
}
],
"format": "${file}:${startLine} ${message}",
"output": "stdout"
},
"name": "dotenv-linter",
"on": [
"change",
"save"
]
}
]
for some reason ${file}
resolves to extension-output-tamayika.vscode-any-lint-#1-any-lint
now
Sorry, I found dynamic import error only in vscode production environment. I rollbacked to 0.3.1(the same as 0.2.2). Please be patiant to resolve vscode issue.
Wow, these issues are old as hell.
Is there anything you can do to rewrite the way you were trying?
Because I feel like nothing will happen to fix the issues for ages
yeah, if possible somehow to rethink the solution to not wait for these changes then probably the wisest thing would be to it...
I will investigate if there is a work around in a week.
I've released 0.3.2
and confirmed it works well in vscode production environment.
If you have some trouble in configuration, please re-open this issue.
For example: output from cli:
.internal/.src/.env/.0.env:1 SpaceCharacter: The line has spaces around equal sign
format:
${file}:${startLine} ${message}
But
SpaceCharacter
is ID of rule that I'd like to process inopenUri
action. Did not find any example how to do it with plain line output parsing and not json. Please advise.something like:
${file}:${startLine} ${ruleId}: ${message}
Then if I understood correctly use something like: