ruff/crates
Charlie Marsh 242df67cbf
Move lint rules out of checkers/ast/mod.rs (#5957)
## Summary

This PR attempts to draw some basic separation between the `Checker`'s
traversal responsibilities (traversing the AST, building the semantic
model) and its calling-out-to-lint-rule responsibilities. It doesn't try
to introduce any sophisticated API. Instead, it just moves all of the
lint rule calls out of `checkers/ast/mod.rs` and into methods in a new
`analyze` module. (There are four remaining lint rules in `Checker`, but
I'll remove those in future PRs.)

I'm not trying to "solve" our lint rule API here. Instead, I'm trying to
make two improvements:

1. `checkers/ast/mod.rs` has just gotten way too large, and people work
in it all the time. Prior to this PR, it was 5.5k lines, which led to
significant lags in my editor and made it really hard to reason about
the parts that are _actually_ important. (I like big files, but this one
crossed the line for me.) Now, it's < 2,000 lines, and the code is much
more focused.
2. I want to avoid accidentally adding lint rules in the "wrong" parts
of the traversal. By confining lint rule invocations to these "analyze"
calls, we'll avoid (e.g.) putting them in the binding phase.
2023-07-24 19:20:10 +00:00
..
flake8_to_ruff Bump version to 0.0.280 (#5965) 2023-07-21 22:36:13 -04:00
ruff Move lint rules out of checkers/ast/mod.rs (#5957) 2023-07-24 19:20:10 +00:00
ruff_benchmark Make lint_only aware of the source kind (#5876) 2023-07-19 09:29:35 +05:30
ruff_cache
ruff_cli Use Flags::intersects rather than Flags::contains (#6007) 2023-07-23 02:59:31 +00:00
ruff_dev Add formatter progress tracking to CI (#5919) 2023-07-24 09:12:42 +00:00
ruff_diagnostics Run nightly Clippy over the Ruff repo (#5670) 2023-07-10 23:44:38 -04:00
ruff_formatter Playground: Fix escaped quotes handling (#5906) 2023-07-20 09:25:27 +00:00
ruff_index Add unreachable code rule (#5384) 2023-07-04 14:27:23 +00:00
ruff_macros Run nightly Clippy over the Ruff repo (#5670) 2023-07-10 23:44:38 -04:00
ruff_python_ast Avoid allocations in SimpleCallArgs (#6021) 2023-07-24 04:55:37 +00:00
ruff_python_formatter Fix formatter with-statement after-as own line comment instability (#6033) 2023-07-24 18:12:07 +00:00
ruff_python_resolver Fix CI by downgrading to cargo insta 1.29.0 (#5589) 2023-07-08 14:54:49 +00:00
ruff_python_semantic Allow specification of logging.Logger re-exports via logger-objects (#5750) 2023-07-24 00:38:20 -04:00
ruff_python_stdlib Fix logging rules with whitespace around dot (#6022) 2023-07-24 05:14:48 +00:00
ruff_python_trivia SimpleTokenizer: Fix infinite loop when lexing empty quotes (#5917) 2023-07-20 15:18:35 +02:00
ruff_rustpython
ruff_shrinking Document formatter error shrinking (#5915) 2023-07-21 11:32:12 +02:00
ruff_textwrap Rename ruff_python_whitespace to ruff_python_trivia (#5886) 2023-07-19 11:48:27 -04:00
ruff_wasm Allow specification of logging.Logger re-exports via logger-objects (#5750) 2023-07-24 00:38:20 -04:00