Closed mgzenitech closed 1 month ago
Thanks for the report. Please wait for the next release.
@tamayika I think something's still off...
{
"args": [
"`run`",
"`dotenv-linter`",
"`fix`",
"`-q`"
// "${file}"
],
"binPath": "`poetry`",
// "cwd": "${workspaceFolder}",
"lintAfterRun": "true",
"title": "`Fix all fixable problems`",
"type": "run"
}
When I uncomment any line with ${}
any-lint would stop showing anything related to actions. Could there be a bug somewhere in there?
In run
action, you must use js expression.
So, ${file}
is making syntax error as js expression.
{
"args": [
"`run`",
"`dotenv-linter`",
"`fix`",
"`-q`",
"$.file"
],
"binPath": "`poetry`",
"cwd": "$.workspaceFolder",
"lintAfterRun": "true",
"title": "`Fix all fixable problems`",
"type": "run"
}
In
run
action, you must use js expression. So,${file}
is making syntax error as js expression.{ "args": [ "`run`", "`dotenv-linter`", "`fix`", "`-q`", "$.file" ], "binPath": "`poetry`", "cwd": "$.workspaceFolder", "lintAfterRun": "true", "title": "`Fix all fixable problems`", "type": "run" }
May I suggest normalizing same options?
Right now we have this:
"any-lint.linters": [
{
"args": [
"run",
"dotenv-linter",
"-q",
"${file}"
],
"binPath": "poetry",
"cwd": "${workspaceFolder}",
...
}
]
vs
"diagnostic": {
"actions": [
{
"args": [
"`run`",
"`dotenv-linter`",
"`fix`",
"`-q`",
"`--no-backup`",
"$.file"
],
"binPath": "`poetry`",
"cwd": "$.workspaceFolder",
...
}
]
}
If parsing with js is needed then probably also the non diagnostic action options should also follow same format? :)
No, configuration of linter execution does not need dynamic evaluation because it is before linter execution. It should be the same as vscode standard configuration.
(that's same as running
dotenv-linter fix -q ${file}
)When clicking on this action I get this: