erickgnavar / flymake-ruff

flymake plugin for ruff linter
GNU General Public License v3.0
37 stars 6 forks source link

flymake-ruff vs python-flymake-command setting #10

Closed doolio closed 10 months ago

doolio commented 1 year ago

This is more a question than an issue. Is flymake-ruff necessary if one updates the python-flymake-command setting to be something like ("ruff check --watch") (default is ("pytflakes")? And if so should one update that setting as well?

erickgnavar commented 1 year ago

I haven't used python-flymake-command, doing this it will have the same behaviour?

doolio commented 1 year ago

Not quite. I've since learned that one should set that parameter to something like:

 ("ruff" "--quiet" "--stdin-filename=stdin" "-"))

It works. However, I'm not sure if it achieves the same as your package or if your solution offers other niceties.

erickgnavar commented 1 year ago

I just tested the code python-flymake-command and it works pretty well, by now the only differences with this package will be:

doolio commented 1 year ago

flymake-ruff show a prefix in the error so we can now this was produced by ruff

Yes, I haven't figured out how to do so yet. It should be possible though.

flymake-ruff support to use a config file, in case it found inside the project it will use it

I haven't tested all locations yet but it picks up a config at ~/.confg/ruff/ruff.toml automatically. IIUC correctly it is ruff anyway that checks for the presence of the config file in the allowed locations.

doolio commented 1 year ago

flymake-ruff show a prefix in the error so we can now this was produced by ruff

Yes, I haven't figured out how to do so yet. It should be possible though.

FYI, when using Eglot the errors reported via flymake do include a ruff prefix.

Edit: But I believe that is information provided by the :source parameter coming from the server.

erickgnavar commented 10 months ago

it looks like it has similar behaviour, however flymake-ruff will still be alive as a separate package, maybe in the future I'll add some other features. Thanks for the input :)