Implement pre-commit plugins for VSCode/PyCharm/Intellij maybe
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 484
Description
### Body
We are one of the biggest users of `pre-commit` framework and we have A LOT of pre-commit checks that not only tell you what you should fix but also often fix things for you. This is happening "early" (i.e. at commit time if you run `pre-commit install`. However, seems that it should be possible to run them even earlier in software development cycle - i.e. in the IDE as you modify files.
It shoudl be possible to build a plugin for IntelliJ(PyCharm) and VSCode that would register to the same files that `.pre-commit-config.yml` describe and run pre-commits in the background for those change - either fixing files as you save them or surfacing the errors it finds as IDE errors - with link to the sources and corrective actions even (possibly as long term option).
I think we have everything we need from the `pre-commit` side of things - also our pre-commits are optimized to be `as fsat as possible` especially a lot of emphasis is put on caching in some cases. So it should be entirely suitable to run those pre-commits as part of such plugins.
If someone has an experience with writing IntelliJ / VSCode plugins, that might be an interesting, good first task that we could even contribute to the general community - it should be generic. Airflow does not use anything "special" in pre-commit, everything we do there is "generically" supported by standard pre-commit (we just wrap the calls to pre-commit in breeze to allow for autcompletion and some shorthand arguments).
Also see discussion in https://github.com/apache/airflow/pull/35236#issuecomment-1784118677
### Committer
- [X] I acknowledge that I am a maintainer/committer of the Apache Airflow project.
Contributor guide
Research direction
Start with the discussion linked from PR 35236 and the repository’s .pre-commit-config.yml; determine whether the first scope is VSCode, IntelliJ, PyCharm, or all three. Define how configured hooks run on file changes, how fixes and errors surface in the IDE, and what demonstrates completion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100