erickgnavar / flymake-ruff

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

flake8 errors still reported with flymake-ruff in use #13

Closed hardaker closed 6 months ago

hardaker commented 10 months ago

I definitely do get ruff related errors when I use the standard eglot related config per the readme. The problem is that I also still get flake8 related warnings as well (most specifically -- line too long). I have a project.toml file that specifically tells ruff to ignore these, so my ruff output is clean.

I think (ie, I started chasing code but failed to finish) that we might want to disable flymake from using other tools as well (possibly with an option config)? Oddly, I tried this:

(setq python-flymake-command '("cat" "/dev/null"))

but it didn't work (IE, I still got flake8 errors).

erickgnavar commented 10 months ago

Can you try this:

(with-eval-after-load 'python
  (setq-local flymake-diagnostic-functions (delete 'python-flymake flymake-diagnostic-functions)))

It will remove default python flymake function so only flymake-ruff will be working

hardaker commented 10 months ago

Nope, didn't work.

rweir commented 9 months ago

I'm also seeing this (though python-mode is defaulting to pyflakes for me). I found this issue while trying to figure out how to disable it by fiddling with flymake-diagnostic-functions. In the end, I found that the language server itself runs linters, which get fed back via flymake - you can tell eglot to the language server to stop doing that like this, config options are here.

erickgnavar commented 8 months ago

@hardaker does the solution proposed by @rweir fixed your problem? It seems that this problem is related to eglot rather than flymake-ruff 🤔

erickgnavar commented 6 months ago

Closed by inactivity

hardaker commented 6 months ago

Ugh, sorry for the delay. The solution was complex and my work took over my life for a bit. I'll try the proposed solution, but I think I need to read a lot first. The bug should stay closed, certainly, as the source of the problem is understood at least.