fix: suppress dead_code warnings in github-guard#2014
Merged
Conversation
future permission-based integrity labeling, not yet wired into production code paths) and #[allow(dead_code)] to the is_bot helper (only used in permissions tests). Eliminates all 8 compiler warnings while preserving the code and its tests for future use. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Suppresses Rust dead_code warnings in the github-guard crate for code that is currently test-only or future-facing scaffolding, keeping builds warning-free while preserving the code for later production wiring.
Changes:
- Added a module-level
#![allow(dead_code)]topermissions.rs(explicitly documented as scaffolding). - Annotated
labels::helpers::is_bot()with#[allow(dead_code)]since it’s currently only referenced from tests.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
guards/github-guard/rust-guard/src/permissions.rs |
Documents the module’s scaffolding status and suppresses dead_code warnings at the module level. |
guards/github-guard/rust-guard/src/labels/helpers.rs |
Suppresses dead_code warnings for is_bot() which is currently only used in tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
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.
Fixes all 8 compiler warnings in the github-guard Rust crate.
Changes
labels/helpers.rs: Added#[allow(dead_code)]tois_bot()helper, which is only consumed bypermissionstests.Verification
make test(github-guard): 57 tests pass, 0 warningsmake agent-finished(top-level): all checks pass