4 ms·
The benchmarks are impressive, and maybe this is a stupid question, but who lints an entire codebase constantly? In my daily use, I just lint on save, and those
by elcapitan 4y ago
The benchmarks are impressive, and maybe this is a stupid question, but who lints an entire codebase constantly? In my daily use, I just lint on save, and those are smaller files where I never noticed a difference between different linters.
- claytonjy 4y agoSame, but in CI I generally lint with pre-commit run --all-files because it can be much tricker or more error-prone to only lint the correct diff when you're dealing with MRs. I definitely notice the speed hit there, though it usually pales in comparison to running pytest. Honestly mypy is the slowest one now, which ruff doesn't intend to replace.
- edflsafoiewq 4y agoAren't linters global? If you change the number of args to a function, you want the linter to tell you all call sites with the wrong number of args right?
- elcapitan 4y agoThat's something I would expect from more advanced static analysis like mypy, but not flake8? Maybe just different use cases under the same category name.
- edflsafoiewq 4y agoWell a linter can do as much or as little as you want. Certainly having global checks is better than having only local checks and if you can check the whole codebase in under half a second, why not?
- elcapitan 4y agoIs it doing that though? My understanding from their FAQ and comparisons is that they're intending to replace flake8 and the likes, not mypy. And if they're implementing a subset, then the de-facto standard for the larger per-commit checks is still the one you'll have to run.
- edflsafoiewq 4y agoQuick test shows ruff doesn't seem to.
- abalaji 4y agofolks who work on teams, with frequent diffs where the linter goes in CI and sometimes catches bugs: see flake8-bugbear et. al.