Skip to content

perf: use HashSet for file exclusion, increase test coverage to 93%#2

Merged
7a6163 merged 5 commits intomainfrom
perf/hashset-exclusion-and-test-coverage
Mar 11, 2026
Merged

perf: use HashSet for file exclusion, increase test coverage to 93%#2
7a6163 merged 5 commits intomainfrom
perf/hashset-exclusion-and-test-coverage

Conversation

@7a6163
Copy link
Copy Markdown
Owner

@7a6163 7a6163 commented Mar 11, 2026

  • Change collect_excluded_files to return HashSet for O(1) exclusion lookups instead of O(n) Vec::contains
  • Use saturating_sub in print_fix_statistics to prevent potential arithmetic underflow
  • Add 216 new tests (184 unit + 6 integration + 26 existing) covering all modules: offense, output, file_traverser, config, comment_directives, analyzer, fix, ast_helpers, and all scanners
  • Add module_eval heredoc fixture test
  • Add CLI integration tests for --fix, --format, and config loading
  • Coverage: 61.87% → 93.10% (1106/1188 lines)

7a6163 added 2 commits March 11, 2026 15:04
- Change collect_excluded_files to return HashSet<PathBuf> for O(1)
  exclusion lookups instead of O(n) Vec::contains
- Use saturating_sub in print_fix_statistics to prevent potential
  arithmetic underflow
- Add 216 new tests (184 unit + 6 integration + 26 existing)
  covering all modules: offense, output, file_traverser, config,
  comment_directives, analyzer, fix, ast_helpers, and all scanners
- Add module_eval heredoc fixture test
- Add CLI integration tests for --fix, --format, and config loading
- Coverage: 61.87% → 93.10% (1106/1188 lines)
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 11, 2026

Codecov Report

❌ Patch coverage is 97.74059% with 27 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ast_helpers.rs 94.52% 25 Missing ⚠️
src/analyzer.rs 98.55% 1 Missing ⚠️
src/scanner/for_loop_scanner.rs 96.15% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/comment_directives.rs 99.20% <100.00%> (+6.67%) ⬆️
src/config.rs 100.00% <100.00%> (+11.47%) ⬆️
src/file_traverser.rs 98.47% <100.00%> (+22.71%) ⬆️
src/fix.rs 100.00% <100.00%> (+16.83%) ⬆️
src/offense.rs 100.00% <100.00%> (+31.11%) ⬆️
src/output.rs 99.01% <100.00%> (+77.09%) ⬆️
src/scanner/method_call_scanner.rs 97.00% <100.00%> (+3.23%) ⬆️
src/scanner/method_definition_scanner.rs 97.53% <100.00%> (+11.40%) ⬆️
src/scanner/rescue_scanner.rs 96.77% <100.00%> (+0.94%) ⬆️
src/analyzer.rs 96.11% <98.55%> (+15.93%) ⬆️
... and 2 more

... and 1 file with indirect coverage changes

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

7a6163 added 3 commits March 11, 2026 15:10
- Upgrade actions/checkout v4 → v5
- Upgrade actions/upload-artifact v4 → v5
- Upgrade actions/download-artifact v4 → v5
- Upgrade docker/setup-qemu-action v3 → v4
- Upgrade docker/setup-buildx-action v3 → v4
- Upgrade docker/login-action v3 → v4
- Upgrade docker/metadata-action v5 → v6
- Upgrade docker/build-push-action v6 → v7
- Add FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 env for remaining v2 actions
- Apply cargo fmt formatting fixes
@7a6163 7a6163 merged commit 348638e into main Mar 11, 2026
7 checks passed
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.

2 participants