commaai / openpilot

openpilot is an operating system for robotics. Currently, it upgrades the driver assistance system in 275+ supported cars.
https://comma.ai/openpilot
MIT License
49.75k stars 9.05k forks source link

Replace `pre-commit` with something fast #33173

Closed adeebshihadeh closed 2 months ago

adeebshihadeh commented 2 months ago

pre-commit is super slow, doesn't exactly match CI on my machine (what does the slowness get me?), and I've found myself fighting with its config on a few occasions. And sometimes it even corrupts my git repo.

I'm thinking something like op that runs ruff, mypy, etc. Something you don't want to git commit -n.

Essentials to start, rest can be added later:

maxime-desroches commented 2 months ago

Turns out that codespell was never configured correctly (ironically a typo) in the pre-commit-config.yaml and only ran against 2 dictionaries instead of the 7 specified. It now flags 400+ "errors"

sshane commented 2 months ago

@maxime-desroches can we close?

maxime-desroches commented 2 months ago

@sshane Still have to add an actual pre-commit hook using the new lint.sh