mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-18 11:41:21 +00:00
## Summary This PR moves the `has_comments` function from `Indexer` to `CommentRanges`. The main motivation is that the `CommentRanges` will now be built by the parser which is shared between the linter and the formatter. Thus, the `CommentRanges` will be removed from the `Indexer`. ## Test Plan `cargo test` |
||
|---|---|---|
| .. | ||
| comment_ranges.rs | ||
| comments.rs | ||
| cursor.rs | ||
| lib.rs | ||
| pragmas.rs | ||
| textwrap.rs | ||
| tokenizer.rs | ||
| whitespace.rs | ||