3 ms·
I mentioned elsewhere but might as well here again. These tools should only be run on the files that changed, not every single one in the repo. I run my tools
by mixmastamyk 4y ago
I mentioned elsewhere but might as well here again. These tools should only be run on the files that changed, not every single one in the repo. I run my tools with the script equivalent of:
git status | grep \.py | tools
And it should exit in a split second. We have a pretty large codebase, though not gigantic.
- brenns10 4y agoYou might be interested in pre-commit which does exactly that! https://pre-commit.com/ https://pre-commit.com/ It probably will also support Ruff if it doesn't already.
- mixmastamyk 4y agoYup, I know it, thanks. Think of the above as pseudo code. Still, I want some things to run more often than commit, such as pyflakes.
- globular-toast 4y agoPeople seem to forget the three ways to make things faster in computers: 1. Micro-optimisation, 2. Better algorithms, 3. Change the problem. The potential impact of each of these increases as you go down. Choosing Rust over Python is micro-optimisation. All things being equal, the impact isn't going to be that great. People are like "let me squeeze out every ounce of power from my CPU so I can run a linter on the entire codebase every time I save". Python folk are like "why on earth would you do that?" We simply changed the problem.