Skip to content

refactor(docker): keep the tests out of the files they test - #641

Open
PiquelChips wants to merge 1 commit into
mainfrom
refactor/docker-tests-module
Open

PiquelChips wants to merge 1 commit into
mainfrom
refactor/docker-tests-module

Conversation

@PiquelChips

@PiquelChips PiquelChips commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

A mod tests { … } that takes up a third or more of its file buries the code it tests. In piqueld-docker, 3 such blocks move to a sibling tests.rs (declared by mod tests;), and a foo.rs that gains one becomes foo/mod.rs so self_named_module_files stays satisfied. (engine: 321 of 956 lines, policy: 348 of 677, probe: 82 of 240; each foo.rs becomes foo/mod.rs.)

Only moves: the bodies are unchanged but for rustfmt's indentation. No lint to enable: docs/dev/rust-conventions.md states the rule, and #647 (the last move in the series) updates it. No #[expect]s added.

Part of PQD-169

Note

written by Claude Sonnet 5.5 in Claude Code (via T3 Code)

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cc9a5857-c033-4e61-addb-cb37ed46cedf
Commits

Reviewing files that changed from the base of the PR and between 8dde799 and 284d8dc.

Files selected for processing: 6

  • crates/piqueld-docker/src/engine/mod.rs
  • crates/piqueld-docker/src/engine/tests.rs
  • crates/piqueld-docker/src/policy/mod.rs
  • crates/piqueld-docker/src/policy/tests.rs
  • crates/piqueld-docker/src/probe/mod.rs
  • crates/piqueld-docker/src/probe/tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@PiquelChips
PiquelChips marked this pull request as ready for review November 22, 2026 22: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.

1 participant