Repository navigation
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Active critical build and compilation failures remain, including unresolved Bazel dependencies and an invalid String collection, along with a breaking public API change.
5 open issues
What changed in this PR
This PR enables most Clippy pedantic lints across the Rust workspace, applies the resulting idiomatic refactors, and replaces direct lazy_static usage with std::sync::LazyLock.
Changes:
- Enables workspace-wide Clippy pedantic lints with targeted exceptions.
- Applies refactors across extractors, Yeast, generators, tests, and supporting utilities.
- Updates Cargo and Bazel dependency metadata.
| File | Description |
|---|---|
| unified/swift-syntax-rs/src/main.rs | Simplifies source input selection. |
| unified/swift-syntax-rs/src/lib.rs | Updates test string handling and lint allowances. |
| unified/extractor/tests/corpus_tests.rs | Simplifies environment parsing and assertions. |
| unified/extractor/src/languages/swift/swift.rs | Adds a lint allowance and simplifies iteration. |
| unified/extractor/Cargo.toml | Removes the direct lazy_static dependency. |
| shared/yeast/tests/test.rs | Simplifies helper APIs and raw string literals. |
| shared/yeast/src/range.rs | Adds must_use annotations. |
| shared/yeast/src/query.rs | Simplifies pattern matching and copying. |
| shared/yeast/src/lib.rs | Applies API, formatting, and ownership refactors. |
| shared/yeast/src/dump.rs | Updates documentation and lint allowances. |
| shared/yeast/src/captures.rs | Simplifies option handling. |
| shared/yeast/src/bin/node_types_yaml.rs | Simplifies input selection. |
| shared/yeast-schema/src/node_types_yaml.rs | Refactors field conversion and test literals. |
| shared/yeast-macros/src/template_parse.rs | Avoids unnecessary group moves. |
| shared/yeast-macros/src/lower.rs | Passes token streams by reference and adds a lint allowance. |
| shared/yeast-macros/src/ast.rs | Simplifies a test raw string literal. |
| shared/tree-sitter-extractor/tests/multiple_languages.rs | Updates renamed test fixture fields. |
| shared/tree-sitter-extractor/tests/integration_test.rs | Updates renamed test fixture fields. |
| shared/tree-sitter-extractor/tests/common/mod.rs | Renames the source archive fixture field. |
| shared/tree-sitter-extractor/src/trap.rs | Simplifies formatting and writes output incrementally. |
| shared/tree-sitter-extractor/src/options.rs | Simplifies error formatting. |
| shared/tree-sitter-extractor/src/node_types.rs | Refactors ownership and string construction. |
| shared/tree-sitter-extractor/src/generator/ql.rs | Simplifies generated output formatting. |
| shared/tree-sitter-extractor/src/generator/ql_gen.rs | Simplifies matching and adds lint allowances. |
| shared/tree-sitter-extractor/src/generator/mod.rs | Simplifies generated name construction and borrowing. |
| shared/tree-sitter-extractor/src/file_paths.rs | Simplifies path handling and formatting. |
| shared/tree-sitter-extractor/src/extractor/mod.rs | Simplifies verbosity handling and control flow. |
| shared/tree-sitter-extractor/src/extractor/driver.rs | Adds a lint allowance and improves path formatting. |
| shared/tree-sitter-extractor/src/diagnostics.rs | Simplifies string cloning and defaults. |
| shared/tree-sitter-extractor/Cargo.toml | Removes the direct lazy_static dependency. |
| rust/extractor/src/util.rs | Changes option comparison inputs to borrowed values. |
| rust/extractor/src/translate/base.rs | Makes statement-style control flow explicit. |
| rust/extractor/src/rust_analyzer.rs | Moves local constants near their uses. |
| rust/extractor/src/main.rs | Simplifies option handling and adds a lint allowance. |
| rust/extractor/src/diagnostics.rs | Simplifies default string construction. |
| rust/extractor/src/crate_graph.rs | Simplifies iterator filtering and comparison. |
| rust/extractor/src/configuration.rs | Adapts callers to the updated option comparator. |
| rust/extractor/src/config/deserialize.rs | Avoids an unnecessary string clone. |
| rust/extractor/src/config.rs | Simplifies the separator literal. |
| rust/ast-generator/src/main.rs | Simplifies grouped matches and borrowing. |
| rust/ast-generator/patches/rust-analyzer.patch | Applies equivalent Clippy-driven changes to the patched generator. |
| ruby/extractor/src/main.rs | Passes extractor options by reference. |
| ruby/extractor/src/extractor.rs | Replaces lazy_static with LazyLock and simplifies ownership. |
| ruby/extractor/Cargo.toml | Removes the direct lazy_static dependency. |
| ql/buramu/src/main.rs | Replaces lazy_static with LazyLock. |
| ql/buramu/Cargo.toml | Removes the direct lazy_static dependency. |
| MODULE.bazel | Updates exported Rust workspace dependencies. |
| misc/bazel/3rdparty/rust_workspace_deps/lazy_static/BUILD.bazel | Removes the obsolete dependency alias. |
| misc/bazel/3rdparty/rust_workspace_deps/lazy_static-1.5.1/BUILD.bazel | Removes the obsolete versioned alias. |
| misc/bazel/3rdparty/rust_workspace_deps/crates.bzl | Updates generated dependency mappings. |
| misc/bazel/3rdparty/rust_workspace_deps/BUILD.bazel | Removes obsolete lazy_static aliases. |
| cpp/extractor/bmn/src/package_database.rs | Improves path error formatting. |
| cpp/extractor/bmn/src/main.rs | Improves executable path error formatting. |
| cpp/extractor/bmn/src/gnu_compiler_default_include_finder.rs | Updates compiler error formatting and tests. |
| cpp/extractor/bmn/src/file_filter.rs | Improves path error formatting. |
| cpp/extractor/bmn/src/dependency_installation.rs | Improves command failure formatting. |
| cpp/extractor/bmn/src/compiler.rs | Improves compiler error formatting. |
| clippy.toml | Adds documentation identifier configuration. |
| Cargo.toml | Enables workspace-wide pedantic Clippy lints and exceptions. |
| Cargo.lock | Removes direct lazy_static dependency entries from workspace packages. |
Review effort: Lite (auto)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e4429304-eb0c-4b7d-9675-11e1eabfd0b8
This dependency is unused after fixing errors reported by the `non_std_lazy_statics` Clippy lint.
paldepind
force-pushed
the
rust/more-lint
branch
from
November 11, 2026 11:29
736d1c1 to
28482d5
Compare
paldepind
marked this pull request as ready for review
November 11, 2026 11:44
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR enables most lints in Clippy's
pedanticgroup, similar to what we used to have for the C/C++ BMN setup. Compared to that I've disable a few more rules, since they provided false positives or results of dubious value.All the lint errors have been fixed using Clippy's automatic
--fixoption or by Copilot. I've vetted each rule that required changes and gone through all the changes. Combined with #23053 we've now fixed 207 lint errors! Of course many of these are very tiny improvements, but almost all of them makes the code more consistent, idiomatic, performant, clear/explicit, robust, etc. So I think this is overall a really nice improvement.I did a commit for each lint rule that was addressed. This makes it easy to see why something was changed, but make per-commit review rather tedious. The changes here are rather simple and of a if-it-still-compiles-it-still-works kind. So I think a very light review of the changes is sufficient. I've started DCA for Rust, Ruby and Unified.