I can use ruff or black from the command line to automatically fix linting issues with my files. Is there a package or a commando to do this within ST?
Package or command to apply auto linting
And https://packagecontrol.io/packages/SublimeLinter-contrib-ruff or the LSP version https://packagecontrol.io/packages/LSP-ruff
1 Like
Gabriel_p
#4
Thank you both! I tested python-black and it does what I need. I also attempted to use LSP-ruff but I can not get it to work. I mean, it shows the lint messages but how do I make it apply the fixes on command and/or on save? I added:
// Only "source.*" actions are supported.
"lsp_code_actions_on_save": {
"source.fixAll.ruff": true,
},
to LPS.sublime-settings
but nothing happens an save. I know that ruff
is working because I can use the command line to invike it as $ ruff format file.py
and it does apply the changes.
0 Likes