Skip to content

Comments

🧹 remove misleading dead_code allowance on GitlabProjectEvent#100

Closed
myaple wants to merge 3 commits intomainfrom
cleanup-misleading-dead-code-attributes-13124981988551692916
Closed

🧹 remove misleading dead_code allowance on GitlabProjectEvent#100
myaple wants to merge 3 commits intomainfrom
cleanup-misleading-dead-code-attributes-13124981988551692916

Conversation

@myaple
Copy link
Owner

@myaple myaple commented Feb 18, 2026

This change removes the #[allow(dead_code)] attribute from GitlabProjectEvent and GitlabEventNote structs in src/models.rs. These attributes were misleading because both structs are actively used in src/polling.rs for processing GitLab note events and detecting bot mentions.

I also ran cargo fmt --all to ensure the codebase remains correctly formatted.


PR created automatically by Jules for task 13124981988551692916 started by @myaple

Removed #[allow(dead_code)] from GitlabProjectEvent and GitlabEventNote
in src/models.rs. These attributes were misleading as these structs
are actively used in the polling logic to handle bot mentions.

Ran cargo fmt to ensure consistent formatting.

Co-authored-by: myaple <10523487+myaple@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules bot and others added 2 commits February 18, 2026 21:12
- Removed struct-level #[allow(dead_code)] from GitlabProjectEvent,
  GitlabEventNote, GitlabCommit, LabelKnowledge, and LabelOperation.
- Added granular #[allow(dead_code)] to specifically unused fields
  and variants to accurately reflect code usage.
- Ran cargo fmt --all.

These changes improve code health by allowing the compiler to track
the usage of members while still suppressing warnings for API-only
fields.

Co-authored-by: myaple <10523487+myaple@users.noreply.github.com>
- Replaced over-broad struct-level #[allow(dead_code)] with granular
  field-level and variant-level allowances in src/models.rs,
  src/gitlab.rs, and src/triage.rs.
- This accurately identifies reachable code (like note fields in events)
  while satisfying clippy for unused API model members.
- Ran cargo fmt --all.

Co-authored-by: myaple <10523487+myaple@users.noreply.github.com>
@myaple myaple closed this Feb 18, 2026
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.

1 participant