6 points · by vinnyglennon · 2y ago · 6 comments
The most important for me is ruff, especially on personal projects with no CI.
Yelp's secrets scanner is nice. I use texthooks to block smart quotes, I block tabs, bad yaml and JSON syntax, and I use a regex to check that the string "-e " doesn't appear in requirements.txt.
I block git conflict markers and a few other trivial things.
I would use liccheck, but it has issues with detecting conflicts that don't exist in system site packages venvs.
I could see using a SPDX license header checker too.
[1] https://gitlab.com/jjg/cptutils/-/blob/master/bin/status-jso...
I'd argue that's the point of pre-commit. Doing it for you locally before submitting the PR so you don't have to be mindful about it.
You need those saves to go through no matter what, even when things are broken. You plan to squash all the feature commits when you are done so you don't care about the formatting quite as strongly for commits that will disappear soon anyway.
You do "checks" before your commits?!?
#mustbenice ;)