-
Notifications
You must be signed in to change notification settings - Fork 787
feat(ruff): add support for ruff python linter #1068
Conversation
Quick note: I wasn't sure how to deal with severity, and currently only works when you have a project.toml, I il try working around this. |
Requiring a config file isn't a big deal as long as we mention it in the documentation, which we can do using the Could you also take a look at this comment on another PR about |
Exit code handling looks good! I poked around the repository and wasn't able to find any information about |
Is there a good example for using a temp file ? Im guessing something like this Right ? Cheers. |
Right, setting |
That should be it, didn't come across any major errors only thing that confused me was in poetry projects it required the root dir, but as you stated, pretty certain that can be updated in the docs. |
Great, this looks good to go! If we can just add a mention of any setup requirements to the |
when |
I tried to fix this. |
Hi il add it now, I'm very sorry I have not been working on this, I've been focusing on uni so my time has become very niche, it should be up now :) Thanks for helping out as well >.< |
Think this is good to merge? @jose-elias-alvarez Did we miss anything? |
I would like to see this to be merged. However, as mention above,
|
Install ruff and enable ruff diagnostics. Nothing special needs to be added to "notes" currently. |
My understanding was that this source only works if you have a project.toml file. If that's the case, this should be mentioned in the documentation. Ideally we could also catch errors stemming from missing config files and show them as diagnostics, as in this example, but we can save that for a follow-up. If that's not the case and the linter runs properly without any additional setup, then this is good to go, so let me know. |
The linter runs properly without any additional setup, now. |
There are two things that may need to be resolved in the future. One is that the upstream does not distinguish between errors, warnings and information, but outputs error information according to the function. The severity is not absolutely correct.ruff is in very active development, and new error types may appear. The second is that ruff has the - fix option, maybe it is possible to add code_actions. |
Great, thanks for confirming and thanks everyone for the work on this! |
No description provided.