Skip to content

Get code coverage to 100%#217

Merged
dfed merged 4 commits intomainfrom
dfed/increase-code-coverage
Apr 6, 2026
Merged

Get code coverage to 100%#217
dfed merged 4 commits intomainfrom
dfed/increase-code-coverage

Conversation

@dfed
Copy link
Copy Markdown
Owner

@dfed dfed commented Apr 6, 2026

Summary

  • Add tests for previously uncovered code paths: SuppressedTypeSyntax unknown fallback, ExprSyntax closure type with arguments via SequenceExprSyntax, and cross-module mock scope filtering
  • Refactor GenericSpecializationExprSyntax handling in ExprSyntax.typeDescription to match expression nodes directly, eliminating an unreachable switch case
  • Remove dead guard !code.isEmpty in generateMockCode — mock roots always produce non-empty code, so simplify the task group from GeneratedRoot? to GeneratedRoot
  • Simplify availability annotations in SafeDITool

Test plan

  • All 720 tests pass
  • SwiftFormat lint passes
  • CI passes on all platforms

🤖 Generated with Claude Code

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ea652c4) to head (e8d5638).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main      #217      +/-   ##
===========================================
+ Coverage   99.95%   100.00%   +0.04%     
===========================================
  Files          40        40              
  Lines        6070      6045      -25     
===========================================
- Hits         6067      6045      -22     
+ Misses          3         0       -3     
Files with missing lines Coverage Δ
...afeDICore/Generators/DependencyTreeGenerator.swift 100.00% <100.00%> (ø)
Sources/SafeDICore/Models/Property.swift 100.00% <100.00%> (ø)
Sources/SafeDICore/Models/TypeDescription.swift 100.00% <100.00%> (+0.36%) ⬆️
...ources/SafeDIMacros/Macros/InstantiableMacro.swift 100.00% <100.00%> (ø)
Sources/SafeDITool/SafeDITool.swift 100.00% <100.00%> (+0.29%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dfed dfed changed the title Increase code coverage Get code coverage to 100% Apr 6, 2026
dfed and others added 4 commits April 5, 2026 22:27
- Add test for ExprSyntax closure type with arguments via SequenceExprSyntax
- Add test for SuppressedTypeSyntax (e.g. ~Copyable) reaching the unknown fallback
- Add test verifying cross-module types with generateMock: true are skipped
- Refactor GenericSpecializationExprSyntax to match expression nodes directly,
  eliminating an unreachable switch case
- Remove dead guard in generateMockCode (mock roots always produce non-empty code)
- Simplify availability annotations in SafeDITool

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Change `case attributed(TypeDescription, specifiers: [String]?, attributes: [String]?)`
to use non-optional `[String]`, eliminating the unreachable `(.none, .none)` branch
in `asSource`. The parser always produces at least one specifier or attribute for
`AttributedTypeSyntax`, and all programmatic constructors do the same.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dfed dfed force-pushed the dfed/increase-code-coverage branch from 97550c8 to e8d5638 Compare April 6, 2026 05:38
@dfed dfed marked this pull request as ready for review April 6, 2026 06:10
@dfed dfed merged commit ab4d828 into main Apr 6, 2026
19 checks passed
@dfed dfed deleted the dfed/increase-code-coverage branch April 6, 2026 06:10
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