-
Notifications
You must be signed in to change notification settings - Fork 21
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
Support ruff #511
Comments
That the reason why I did wrote autohooks. Using the standard
We didn't test ruff yet so we don't have any plans to implement a plugin at the moment. But really it is very easy to write a plugin by yourself. Just take a look at the autohooks plugin for pylint too. It's just a few lines of code. |
@bjoernricks Great that you updated the README - one of the main benefits of autohooks is clearer now. I had a look at the pylint plugin but while it might be easy for you to write a new plugin, without some kind of documentation on how to write a plugin, I think it would not be easy for me to do it. I think ruff support could be another selling point for this library given that ruff is becoming quite popular ("Ruff is extremely actively developed and used in major open-source projects like: Apache Airflow Since it replaces a bunch of linting tools, it would save writing several plugins. ("Ruff can be used to replace Flake8 (plus dozens of plugins), isort, pydocstyle, yesqa, eradicate, pyupgrade, and autoflake, all while executing tens or hundreds of times faster than any individual tool.") I expect it will become the default linter of most projects replacing flake8, pylint etc. so support for it might provide a boost for this project. |
You never know what the future will bring. I've seen tools coming and leaving. At the moment we at Greenbone aren't using ruff. Thus maintaining a plugin for it is a burden and wont happen in near future. Writing a peace of software is the easy part. Maintaining it is the hard work. If there is somebody willing to maintain a ruff plugin now I can assist in writing the plugin.
Actually there is a documentation on how to write a plugin see https://greenbone.github.io/autohooks/create.html
When looking at the pylint plugin you nearly only need to replace all occurrences of |
Ah I missed that documentation. How do you test the plugin without publishing it to pypi? For example, to test the pylint plugin, would you copy the |
Personally I would use an editable install |
In a discussion on the Python.org forums, Python core devs said they think pyproject.toml is being overused by tools so my colleague has begun switching our projects to having tool configuration in a .config folder, so I'll close this issue as no longer needed (at least by me). |
It would be great if autohooks could support ruff.
BTW, I think the fact that this tool uses pyproject.toml (unlike pre-commit) is a big plus that you could highlight in your documentation.
The text was updated successfully, but these errors were encountered: