What does HackerNews think of ruff?

An extremely fast Python linter, written in Rust.

Language: Rust

#53 in Python
#4 in Python
#46 in Rust
Ruff [0] is the best linter around for performance but I'm not sure how well it fills the static analysis role. It has a vscode extension which updates the linting with no noticeable lag but it isn't a full fledged type checker. Their suggestion is to run ruff through the vscode extension and then manually run mypy or whatever type checker on occasion (maybe as a pre commit hook?).

[0] https://github.com/charliermarsh/ruff

This seems to have worked for Ruff in the Python world: https://github.com/charliermarsh/ruff

It re-implements a bunch of popular linting rulesets & plugins in Rust and is incredibly fast, especially compared to the other tools.

in the domain of Python tooling made faster with Rust, check out https://github.com/charliermarsh/ruff which is 10-100x faster than pylint etc
There's a very clear graph the first thing on ruff's GitHub page, easy to find and research yourself: https://github.com/charliermarsh/ruff Can't miss it if you take time to check out the project.
Ruff is another Python linter, written in Rust. https://github.com/charliermarsh/ruff
Pylint is extremely slow, I've preferred flake8 for some time. But now looking into Ruff, handles the whole codebase in less than second (vs minutes). Happy with it so far.

https://github.com/charliermarsh/ruff

This article also highlights some pain points I have with python. They say avoid big list comprehensions, but there is no nice way of piping data in Python one can switch to instead. Especially with lambdas being so underpowered (so they also say to avoid).

They say avoid conditional expressions for all but simple cases, and I agree. Which is what makes me wish everything (like ifs, switches/when etc) in Python was an expression (ala elm, kotlin etc). Because right now it's hard to assign a variable conditionally without having to re-assign / mutate it, which feels unpure.

Default arguments being reused between calls is just weird. So I understand the rationale of Google's style guide, but it's a big flaw in the language imo, lots of weird bugs from novice programmers from that.

I disagree on allowing the @property decorator. You think you're doing a lookup, but it's suddenly a function call doing a db lookup or so. Huge foot gun.

I feel the 80 character rule is too low, and often hard to avoid with keyword arguments, to the django orm etc. End up having to litter comments to disable it all over the place, and waste a lot of time when CI breaks.

As for formatting, whitespace etc. I'm over caring about that for languages. I just have some autoformatter set up to fix everything on save, and someone else can argue about the rules.

If you aren’t happy with Flake8, Pylint, and isort (or maybe if you are!), I recommend checking out Ruff:

https://github.com/charliermarsh/ruff

It’s literally 100 times faster, with comparable coverage to Flake8 plus dozens of plugins, automatic fixes, and very active development.