refactor(baseline): split baseline.rs into a submodule directory (#68)#70
Open
Metbcy wants to merge 1 commit into
Open
refactor(baseline): split baseline.rs into a submodule directory (#68)#70Metbcy wants to merge 1 commit into
Metbcy wants to merge 1 commit into
Conversation
src/baseline.rs was 1274 LOC, over the 1000-LOC soft cap in the module size budget. Split it into src/baseline/ mirroring the run/ and enrich/maintainer/ splits from the #57 series: a thin mod.rs that owns the Baseline/BaselineEntry types and parsing core, plus apply.rs (suppression pass), mutate.rs (baseline-file writing), comment.rs (directive parsing), and tests.rs. Pure mechanical move, no behavior change. The public surface stays reachable at crate::baseline::* and pub mod baseline; in lib.rs is unchanged. doc_kind widened from private to pub(super) since it is now shared across mutate.rs and the tests. Closes #68.
Coverage reportLine coverage: 82.9% (8677 / 10470 lines) Full lcov report available as workflow artifact coverage-lcov: download from this run. v0.9.8 introduces this report; |
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.
Summary
Splits the 1274-LOC
src/baseline.rsinto asrc/baseline/submodule directory, the next file over the 1000-LOC soft cap after the #57 series (PRs #62-#65). Closes #68.This is a pure mechanical move: no logic, control flow, or string literal changed. The layout mirrors the reference shape from PR #62 (run/) and #64 (maintainer/).
Layout
mod.rsBaseline/BaselineEntry/ExpiredEntrytypes and the parsing core (load,from_value,from_value_strict), plus the re-export wiringapply.rsapply)mutate.rsadd_suppression,add_suppression_full,AddOutcome)comment.rsparse_comment_directive)tests.rs#[cfg(test)] mod testsblock, moved verbatimWhy
baseline.rswas the largest non-test file over the soft cap. The split keeps each concern in its own file so review attention does not skip the middle of a 1200-line module, and it follows the budget rule indocs/src/architecture.md.Compatibility
The public surface stays reachable at the same paths (
crate::baseline::{Baseline, BaselineEntry, ExpiredEntry, apply, add_suppression, add_suppression_full, parse_comment_directive, AddOutcome}plus theBaselinemethods).pub mod baseline;insrc/lib.rsis unchanged.doc_kindwas widened from private topub(super)since it is now shared acrossmutate.rsand the tests. No other visibility changed.Testing
cargo build --all-targets --all-features(RUSTFLAGS="-D warnings"): cleancargo clippy --all-targets --all-features -- -D warnings: cleancargo test --all-features: 441 lib + 36 cli + 9 integration + 7 real_world + 1 doc, all passcargo fmt --all --check: cleanCloses #68.