-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin for ruff
for linting (and eventually formatting?)
#299
Comments
Hey @jhossbach, thanks for the suggestion! Sure, we're interested in having a plugin for Ruff because it's a very interesting project with a lot of potential.
Nice! Looking forward to review it. |
Let me know if I can be helpful, or if you run into any questions or issues with the interface. |
Big +1 from me too. Potential packaging concerns aside this sounds great! Two questions:
|
Yeah! Ruff exposes a precise start and end position for all checks. (I'm sure the granularity of those spans could be improved in some cases, but they exist for all checks and improving them is something I'm happy to invest in as those cases come up.) I think it'd be fine to invoke Ruff every time rather than running in watch mode, since watch mode is more useful for monitoring file changes -- but in this case, I'm guessing change events would come from the LSP? |
No, LSP's don't have a monitoring mechanism. That needs to be provided by clients. |
Sorry, that was just sloppy terminology. What I meant to say is that Ruff doesn't need to handle file-watching in this case, right? That it'll be invoked by the LSP at the appropriate times? |
Oh yeah, that's correct. Clients send a |
Currently working on the plugin, I read through #27 but am unsure as to what the naming convention should be from now on. I personally like |
Also, I am unfamiliar with the |
@jhossbach - |
@jhossbach, would you like to host your plugin in our organization? I think it'd be nice, but of course it's up to you. |
Great idea, do I have to be invited to the organization in order to create a new repo there? |
Yep, I just sent you an invite. After you accept it, you could create your repo here. |
Great! I'll create the repo as soon as I get it working locally. |
Closing as completed, you can find the new plugin here: https://github.com/python-lsp/python-lsp-ruff |
Thanks for all your work on this @jhossbach! |
Happy to contribute :) |
I recently came upon ruff which provides a very fast alternative to flake8 written in Rust. It implements all (or most) of the flake8 rules as well as various flake8 plugins with a serious increase of speed.
The plan for this is to eventually plan establish their own LSP but I was wondering if you are interested in a plugin for linting as an alternative to flake8. I am willing to create a pull request if there is some interest.
The text was updated successfully, but these errors were encountered: