Skip to content

chore: remove orphan clang-include-cleaner & clang-apply-replacements refs from tests#246

Merged
shenxianpeng merged 1 commit into
mainfrom
chore/remove-orphan-tool-refs
Jun 19, 2026
Merged

chore: remove orphan clang-include-cleaner & clang-apply-replacements refs from tests#246
shenxianpeng merged 1 commit into
mainfrom
chore/remove-orphan-tool-refs

Conversation

@shenxianpeng

Copy link
Copy Markdown
Member

Summary

PR #242 introduced dynamic PyPI version resolution and also added mock data and test cases for clang-include-cleaner and clang-apply-replacements in the utility layer tests. However, this project only provides pre-commit hooks for clang-format and clang-tidy — no hooks, entry points, or wrapper scripts exist for these other tools.

The util.py resolution layer is already fully generic: it accepts any tool name as a string parameter and resolves versions from PyPI dynamically. Adding mock data and ~160 lines of tests for tools that aren't actually used creates confusion and unnecessary maintenance burden without adding any functional value.

Changes

Removes from tests/test_util.py:

  • MOCK_PYPI_INCLUDE_CLEANER and MOCK_PYPI_APPLY_REPLACEMENTS mock data
  • Mapping entries in _pypi_side_effect()
  • Parametrize entries in test_resolve_version_from_pypi_success and test_resolve_version_from_pypi_not_found
  • 10 dedicated test functions (the entire "New wheel tools" section)

Net: -161 lines, 35 tests still passing.

Why not keep them?

Concern Explanation
Project scope This repo provides clang-format and clang-tidy hooks only. Adding test data for unrelated tools sets false expectations.
No actual hooks There are no entry points, wrapper scripts, or .pre-commit-hooks.yaml entries for these tools.
Dead code burden ~160 lines of tests that exercise a code path that's already covered by clang-format and clang-tidy test cases.
Generic layer The utility API works for any tool name out of the box — no test data needed for future tools.

… refs from tests

PR #242 added clang-include-cleaner and clang-apply-replacements mock data
and test cases to the utility layer tests. However, this project only
provides pre-commit hooks for clang-format and clang-tidy - no hooks,
entry points, or wrapper scripts exist for these tools.

The util.py resolution layer is already fully generic and accepts any
tool name as a string parameter. Adding mock data and tests for tools
that aren't actually used creates confusion and unnecessary maintenance
burden without adding any functional value.

Removes: 10 dedicated test functions + mock data + parametrize entries
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@shenxianpeng, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 51 minutes and 27 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5a053fbc-0923-46a7-98b6-f34a17b96632

📥 Commits

Reviewing files that changed from the base of the PR and between 9fb955a and 87db803.

📒 Files selected for processing (1)
  • tests/test_util.py

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 and usage tips.

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.51%. Comparing base (9fb955a) to head (87db803).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #246   +/-   ##
=======================================
  Coverage   97.51%   97.51%           
=======================================
  Files           3        3           
  Lines         241      241           
=======================================
  Hits          235      235           
  Misses          6        6           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shenxianpeng shenxianpeng merged commit a9b014e into main Jun 19, 2026
31 checks passed
@shenxianpeng shenxianpeng deleted the chore/remove-orphan-tool-refs branch June 19, 2026 18:24
@sonarqubecloud

Copy link
Copy Markdown

@codspeed-hq

codspeed-hq Bot commented Jun 19, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 91 untouched benchmarks
⏩ 53 skipped benchmarks1


Comparing chore/remove-orphan-tool-refs (87db803) with main (3781e52)2

Open in CodSpeed

Footnotes

  1. 53 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (9fb955a) during the generation of this report, so 3781e52 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant