Enable unreachable_pub lint in xtask - #1140
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request enables the rust.unreachable_pub lint for the xtask crate by removing it from the exclusion list in scripts/sync.sh and adding the lint configuration to crates/xtask/Cargo.toml. Consequently, public visibility modifiers (pub) have been restricted to crate-level visibility (pub(crate)) for various functions and constants across crates/xtask/src/footprint.rs, crates/xtask/src/opentitan.rs, and crates/xtask/src/textreview.rs. There are no review comments, so I have no feedback to provide.
|
@googlebot I signed it! |
1 similar comment
|
@googlebot I signed it! |
Removes xtask from the unreachable_pub exclusion list in scripts/sync.sh, adds the lint to crates/xtask/Cargo.toml, and restricts binary-internal items to pub(crate). Continues the incremental work of google#565 (following google#1139 which enabled the lint for the interpreter). Verified on host: cargo check, cargo clippy, and cargo fmt --check all pass with no warnings.
71bbb2e to
c96f293
Compare
What
Enables the
rust.unreachable_publint for thextaskcrate:xtaskfrom theunreachable_pubexclusion list inscripts/sync.sh.rust.unreachable_pub = "warn"tocrates/xtask/Cargo.toml(matching the orderingsync.shgenerates).pub(crate)acrossfootprint.rs,opentitan.rs, andtextreview.rs.Why
Continues the incremental work of #565 ("Fix all lints currently disabled in scripts/sync.sh"), following #1139 which enabled the same lint for the interpreter.
xtaskis a host binary, so none of these items were ever reachable outside the crate.Verification
Ran on host (
aarch64-apple-darwin):cargo check— clean, 0 warningscargo clippy— cleancargo fmt --check— cleanNote: the full Linux CI suite (
scripts/ci.sh) was not run locally.