Server setting to run subset of rules for "Fix All" code action #12709
Labels
configuration
Related to settings and configuration
needs-design
Needs further design before implementation
server
Related to the LSP server
Discussion: #12674
It would be useful to provide a server (and VS Code extension) setting to allow including / excluding only a subset of rules to be fixed when running the
source.fixAll.ruff
code actions on save.Notes
context
field asCodeActionTriggerKind
.For prior art, refer to
eslint.codeActionsOnSave.rules
. This allows for patterns and allows negation as well. Search for "eslint.codeActionsOnSave.rules" in https://github.com/microsoft/vscode-eslint#settings-options for examples.We could introduce a similar option
ruff.codeActionsOnSave.rules
but I don't think we should allow for patterns in it. Our rule selection allows for shorter codes that negates the need for*
pattern. But, we do need to consider about a config to exclude rules instead of including them.One option would be to provide both
include
andexclude
field like so:Or, allow a negation pattern using
!
:The text was updated successfully, but these errors were encountered: