Skip to content

Replace test channel dead code allow (#61) - #205

Draft
leynos wants to merge 1 commit into
mainfrom
issue-61-enforce-lint-policy-in-tests-support-test-channel-rs-replace-disallowed-allow-dead-code
Draft

Replace test channel dead code allow (#61)#205
leynos wants to merge 1 commit into
mainfrom
issue-61-enforce-lint-policy-in-tests-support-test-channel-rs-replace-disallowed-allow-dead-code

Conversation

@leynos

@leynos leynos commented May 25, 2026

Copy link
Copy Markdown
Owner

Summary

This branch replaces the file-level allow(dead_code) in tests/support/test_channel.rs with a documented expect(dead_code) so the compiler can report when the test scaffold expectation is no longer needed.

Closes #61.

Review walkthrough

Validation

  • cargo check --all --benches --tests --examples: passed with no warnings.
  • coderabbit review --agent: passed with findings: 0 before commit.
  • make all: passed, including formatting, clippy, nextest, and GitHub tool tests.
  • coderabbit review --agent: passed with findings: 0 after commit.

Summary by Sourcery

Enhancements:

  • Improve test support code hygiene by replacing a broad dead code allow with a targeted expect for unused items in the channel test scaffold.

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5fe9d266-eb59-4b55-9f95-f4e23dc4773c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-61-enforce-lint-policy-in-tests-support-test-channel-rs-replace-disallowed-allow-dead-code

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Replaces the file-level allow(dead_code) attribute in the test channel support module with a documented expect(dead_code) so the compiler will surface when the dead-code allowance is no longer needed, keeping the test scaffold honest over time.

File-Level Changes

Change Details Files
Tighten lint configuration in the test channel support module by replacing a broad dead code allowance with an explicit expectation.
  • Removed the file-level allow(dead_code) attribute from the test support module
  • Added an expect(dead_code) attribute scoped to the relevant items so that dead code is still allowed but will trigger a compiler note when no longer needed
  • Documented the rationale for the expect(dead_code) usage to clarify intent for future maintainers
tests/support/test_channel.rs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions Bot added size: XS < 10 changed lines (excluding docs) risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs labels May 25, 2026
@leynos
leynos force-pushed the issue-61-enforce-lint-policy-in-tests-support-test-channel-rs-replace-disallowed-allow-dead-code branch from b8dc4ec to 9bfaa26 Compare July 16, 2026 09:54
codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

@leynos
leynos force-pushed the issue-61-enforce-lint-policy-in-tests-support-test-channel-rs-replace-disallowed-allow-dead-code branch from 9bfaa26 to 9a82741 Compare July 17, 2026 22:24
codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

Use a documented `dead_code` expectation for the integration-test
scaffold so the compiler reports when the expectation is obsolete.
@leynos
leynos force-pushed the issue-61-enforce-lint-policy-in-tests-support-test-channel-rs-replace-disallowed-allow-dead-code branch from 9a82741 to 1decce3 Compare July 18, 2026 19:18
codescene-access[bot]

This comment was marked as outdated.

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No quality gates enabled for this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs risk: low Changes to docs, tests, or low-risk modules size: XS < 10 changed lines (excluding docs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enforce lint policy in tests/support/test_channel.rs (replace disallowed allow(dead_code))

1 participant