4 ms·
How many thousands of lines of code do you need to lint before Rust's performance advantages actually matter? After all, performance optimizing a tool where N i
by bjourne 4y ago
How many thousands of lines of code do you need to lint before Rust's performance advantages actually matter? After all, performance optimizing a tool where N is too small to matter is the root of all evil. Keep in mind that you don't have to lint an already linted file if you cache its hash.
- vitorsr 4y agoTo add to your comment: I also think that these rewrites are throwing the baby out with the bathwater. Especially in projects related to code quality and analysis, things like widespread adoption and issues going back almost a decade are much more important than raw performance. For every aspect of functionality, there is a heavy baggage of quirks, bugs, edge cases etc. I am not convinced that a rewrite of a tool that is still in development and still limited to a subset of functionality is able to capture nearly a decade of community work.
- nindalf 4y agoThe author of Ruff mentioned that many people told him exactly what you're saying. He went ahead and built it anyway. I'm puzzled though. Those naysayers were naysaying about an attempt at rewriting. You appear to be naysaying a successfully built project. It's true that the folks who find it most helpful are the ones with large Python projects. But these are sometimes very important, widely used projects. See the testimonials from users (https://beta.ruff.rs/docs/#testimonials https://beta.ruff.rs/docs/#testimonials) > widespread adoption This makes little sense in the context of a linter. As long as my linter implements all the popular rules and my code is kept tidy, what's the issue? What does it matter if there's widespread adoption or not? > still limited to a subset of functionality You have a link to some functionality you're missing and necessary for your workflow? Or is this more of a theoretical concern? Sorry if this comes across as rude.
- vitorsr 4y agoI am happy if this tool works for you but I think writing off my comment as naysaying is not constructive. There is no support for all syntax features of the current language specification and reference implementation. There is also no legacy support. Again, especially in projects concerned with code quality and analysis, building is not more important than long-term maintenance: Both language specification and reference implementation are constantly evolving. The current approach relies on an upstream interpreter and thereby inherits idiosyncratic divergences and limitations. There is no extensibility. The majority of projects are neither public nor frameworks. Often projects employ a number of frameworks each with associated dialects, with both frameworks and dialects also constantly evolving. The current approach to extensibility is approximately one person manually rewriting rules individually from heterogeneous projects that span several contributors over several years. There is already outstanding maintenance work on manually introduced rules, only a subset of which gets flagged by a fraction of adopters. There is even outstanding work on feature parity.
- bastawhiz 4y agoI honestly thought the same thing. I used flake8 and it finished in about a second on my codebase. But when you have that on a git hook, you'd be surprised how the small amount of latency affects your productivity. I have been using ruff for about two months now, and I'm still thinking "Wow that was fast" every time I create a commit.
- OJFord 4y agoWe have a CI pipeline more complicated than it needs to be (=> also engineering time setting that up, maintaining it) because pylint was too slow. Not a snowflake, just a Python web app.
- avgcorrection 4y agoLinting is something that people might do on every commit these days. Commits that take more than 150ms to complete are annoying. And also on every CI run. Oh well every CI run doesn’t sound bad. Except you’re also running 30 other things in order to check 30 other “should always work/be the case” invariants. EDIT: Missed your point about caching already-linted file. In that case maybe performance doesn’t matter. > After all, performance optimizing a tool where N is too small to matter is the root of all evil. Picking a third-party tool that does what it does and happens to be relatively fast. Where’s the evil in that?
- brianwawok 4y agoMy note huge codebase takes 5s for flake8 The max we have ever had is 3 developers at a time, so if we were a 100 or 1000 person company, I bet it's a bit of time.
- minraws 4y ago> Keep in mind that you don't have to lint an already linted file if you cache its hash. yeah, if only that was the case. Even if the file hasn't changed if it's dependencies have changed you need to lint again. And doing dependency analysis on most weirdly coupled codebases out there, is not trivial nor accurate tbh. And not running a good linter and letting a bug through is the most shit feeling you will have in your life. Trust me on that.
- muglug 4y agoIt depends on the type of linting being done. For linters that perform type inference, fanout means having to relint files that might not have changed. But many linters don’t need the full graph — for example, file formatting problems aren’t subject to fanout.
- bjourne 4y agoWhat linter functionality requires global analysis?
- zackees 4y ago[dead]