Re:How to create a Python package in 2022
by doliveira on Thursday July 28, 2022 @10:20AM
(#32264674)
My point is that using these tools at least makes people put these scripts within the repo instead of just in the CI server.
There's no "instead of" to speak of. Either you run the same linting step both locally and on CI, or just on CI, you can't skip linting on CI. Every properly set up CI pipeline has some combination of Makefile/shell script/Dockerfile that runs exactly the same way locally and on CI, which the script checked into the repo itself. If your CI scripts don't exist in your repo, you are doing it wrong.
pre-commit just runs your linter, formatter and tests. Surely you can fully replicate this step locally. Just run make lint both locally and on CI.
Anything else that's hard to replicate has to do with the distributed systems that you are probably working on because these systems are all probably proprietary stuff that live on the cloud.
> Although I'd indeed prefer just before push, or just make display warnings
Wholehearted agree. This is a compromise I can live with.