• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

loresoft / Injectio / 24744660994

21 Apr 2026 08:25PM UTC coverage: 0.0% (-83.7%) from 83.723%
24744660994

push

github

web-flow
Add diagnostic analyzer for service registration validation (#298)

* Add diagnostic analyzer for source generator configuration errors

Introduce compile-time diagnostics (INJECT0001-INJECT0009) that warn about
invalid RegisterServices method signatures, missing/invalid factory methods,
service-implementation type mismatches, and abstract type issues. Diagnostics
are captured as equatable DiagnosticInfo records during the semantic transform
phase to maximize incremental generator pipeline caching.

https://claude.ai/code/session_01FpKv78qmKTTnNZAGyXxGwv

* Move diagnostics from source generator to separate DiagnosticAnalyzer

Reporting diagnostics inside the source generator prevents pipeline
caching from working optimally. Move all validation into a dedicated
ServiceRegistrationAnalyzer (DiagnosticAnalyzer) that runs independently,
keeping the generator focused on pure code generation.

- Add ServiceRegistrationAnalyzer with RegisterSymbolAction for methods
  and named types
- Revert ServiceRegistrationGenerator to original (no diagnostic logic)
- Remove DiagnosticInfo.cs (no longer needed without generator-side
  serialization)
- Revert ServiceRegistrationContext (remove Diagnostics property)
- Update tests to use CompilationWithAnalyzers

https://claude.ai/code/session_01FpKv78qmKTTnNZAGyXxGwv

* Extract shared symbol helpers into SymbolHelpers class

Move duplicated helper methods (IsMethodAttribute, IsKnownAttribute,
IsServiceCollection, IsStringCollection, IsServiceProvider,
ResolveRegistrationStrategy, FullyQualifiedNullableFormat) into a
shared SymbolHelpers class used by both the generator and analyzer.

https://claude.ai/code/session_01FpKv78qmKTTnNZAGyXxGwv

* Migrate from xunit v2 to xunit.v3

Update package reference from xunit 2.9.3 to xunit.v3 1.1.0 to match
the v3 runner already in use. Replace Xunit.Abstractions usings with
Xunit (ITestOutputHelper moved in v3).

https://claude.ai/code/session_01FpKv78qmKTTnNZAGyXxGwv

* Fix CI: reso... (continued)

0 of 583 branches covered (0.0%)

Branch coverage included in aggregate %.

0 of 384 new or added lines in 4 files covered. (0.0%)

433 existing lines in 7 files now uncovered.

0 of 883 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Injectio.Generators/ModuleRegistration.cs


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc