Closed biscanli closed 1 month ago
Hi, thanks for your contribution, do you have any example that doesn't work with newest version of ruff? I can't see any breaking changes in the changelog 🤔
Sure! I ran it on a.py
which had:
from import as
b = 5
In Emacs I didn't get errors, so I ran the ruff
command on this file from the CLI, I got
a.py:1:6: SyntaxError: Expected a module name
a.py:1:13: SyntaxError: Expected an import name
Once I changed the regexp to the one in PR, it started working again.
Oh I see it now, it's for syntax errors, those are not linting errors per se but it might be good to see them. I tested the change and works partially, make sure to define :
as optional so it still works for previous rules
I suggest this change
-(defvar flymake-ruff--output-regex "\\(.*\\):\\([0-9]+\\):\\([0-9]+\\): \\([A-Za-z0-9]+\\): \\(.*\\)")
+(defvar flymake-ruff--output-regex "\\(.*\\):\\([0-9]+\\):\\([0-9]+\\): \\([A-Za-z0-9]+\\):? \\(.*\\)")
Nice catch! Just tested it and it works as I expect it, pushing it now.
Hello!
This PR aims to get the ruff output from version
0.6.9
(which is the latest as of writing this) working withflymake-ruff
. I tested it on my local machine but feel free to give it a poke yourself ,and let me know if anything else needs changing.Btw, thanks for the package!