Skip to content

Improve git branch#9

Merged
b4prog merged 2 commits into
mainfrom
improve-git-branch
Jun 27, 2026
Merged

Improve git branch#9
b4prog merged 2 commits into
mainfrom
improve-git-branch

Conversation

@b4prog

@b4prog b4prog commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes

    • Duplicate reports now use consistent “files analyzed” wording instead of “files scanned.”
    • Verbose duplicate reports now show the analyzed file list when available.
    • Duplicate search counts and messages now better reflect the actual files included in the analysis.
  • Chores

    • Updated the crate version to 0.7.2.

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Renames the scanned_files field on DuplicateReport to analyzed_file_paths and updates render_duplicate_report to emit "Number of files analyzed" / "Files analyzed" labels. The run function in lib.rs is updated to use duplicate_source_files for the analyzed file set. All related tests are updated, and the crate version is bumped to 0.7.2.

Changes

Duplicate report: scanned→analyzed rename

Layer / File(s) Summary
DuplicateReport field and render output
src/report/duplicate_renderer.rs
scanned_files field renamed to analyzed_file_paths; render_duplicate_report now emits "Number of files analyzed" and "Files analyzed" labels. All unit tests updated to use the new field name and assert new output strings.
lib.rs call site and test updates
src/lib.rs
Verbosity gate variable renamed to should_report_analyzed_files; verbose path emission switched to duplicate_source_files. Test assertions updated to expect "Number of files analyzed" / "Files analyzed" across explicit-files, custom-extension, and git-branch test cases.
Version bump
Cargo.toml
Crate version bumped from 0.7.1 to 0.7.2.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • b4prog/CodeM8#2: Modifies the same duplicate-report rendering and verbose output paths, including timings integration in render_duplicate_report.
  • b4prog/CodeM8#8: Modifies duplicate_source_files handling in git-branch mode within lib.rs, directly intersecting with the analyzed-file metric changes here.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is short and loosely matches one aspect of the changes, but it does not capture the main duplicate-report update.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch improve-git-branch

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

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/report/duplicate_renderer.rs`:
- Around line 9-12: The `DuplicateReport` public API change is breaking because
the `pub` field rename will break downstream struct literals and field access.
Update `DuplicateReport` to keep the existing public field name in place, or add
a backward-compatible transition path in the
`duplicate_renderer`/`DuplicateReport` definition so existing callers continue
to compile. If the rename must remain, treat it as a breaking release and adjust
the versioning accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f2fed131-4ad8-428b-8fb3-ae17a1bea4d4

📥 Commits

Reviewing files that changed from the base of the PR and between 65e78be and 7cb022b.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • Cargo.toml
  • src/lib.rs
  • src/report/duplicate_renderer.rs
📜 Review details
🔇 Additional comments (3)
Cargo.toml (1)

3-3: LGTM!

src/report/duplicate_renderer.rs (1)

29-41: LGTM!

Also applies to: 131-140, 151-151, 188-188, 201-247, 259-259

src/lib.rs (1)

36-36: LGTM!

Also applies to: 64-69, 275-275, 323-342, 354-358, 377-377

Comment thread src/report/duplicate_renderer.rs
@b4prog b4prog merged commit f713a79 into main Jun 27, 2026
5 of 7 checks passed
@b4prog b4prog deleted the improve-git-branch branch June 27, 2026 16:26
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