salt-lint icon indicating copy to clipboard operation
salt-lint copied to clipboard

Feature Request: Provide quick-fixes for each rule

Open roaldnefs opened this issue 4 years ago • 1 comments

As salt-lint is able to detect mistakes it would to nice if it is able to provide a (simple) fix for each of the rules. If a quick-fix is provided by the rule it can be added as optional output in the formatters. When salt-lint is able to suggest quick-fixes it could also provide a command line flag to automatically apply them.

Some editors (e.g. vscode using warpnet/vscode-salt-lint), are able to apply quick fixes to the code with a simple click on the suggestion.

roaldnefs avatar Nov 10 '19 13:11 roaldnefs

Does anyone have information on what it would take to implement this, i.e. in what way this information is actually supposed to be implemented and communicated to editors and their extensions? From some quick research, Vim doesn't seem to support quickfix actions, and VSCode doesn't really describe where a quickfix action is supposed to come from / if there is a spec for it.

Perhaps I'm missing something obvious?

Edit: I see this seems to be the spec for quickfix actions: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_codeAction

kittydoor avatar Jun 20 '22 14:06 kittydoor