Skip to content

fix: suppress dead_code warnings in github-guard#2014

Merged
lpcox merged 1 commit intomainfrom
fix/github-guard-warnings
Mar 16, 2026
Merged

fix: suppress dead_code warnings in github-guard#2014
lpcox merged 1 commit intomainfrom
fix/github-guard-warnings

Conversation

@lpcox
Copy link
Collaborator

@lpcox lpcox commented Mar 16, 2026

Fixes all 8 compiler warnings in the github-guard Rust crate.

Changes

  • labels/helpers.rs: Added #[allow(dead_code)] to is_bot() helper, which is only consumed by permissions tests.

Verification

  • make test (github-guard): 57 tests pass, 0 warnings
  • make agent-finished (top-level): all checks pass

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>
Copilot AI review requested due to automatic review settings March 16, 2026 05:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)] to permissions.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.

@lpcox lpcox merged commit b27555b into main Mar 16, 2026
7 checks passed
@lpcox lpcox deleted the fix/github-guard-warnings branch March 16, 2026 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants