@@ -23,16 +23,16 @@ samples/ # Readme sample project
2323
2424## Build & SDK
2525
26- | Setting | Value |
27- | ---| ---|
28- | .NET SDK | 10.0.x (` global.json ` , ` rollForward: latestMinor ` ) |
29- | Target frameworks | ` net8.0 ` + ` net10.0 ` (library); ` net8.0;net9.0;net10.0 ` (functional tests) |
30- | C# language version | ` 12.0 ` on ` net8.0 ` , ` 14.0 ` on ` net10.0 ` |
31- | Nullable | ` enable ` |
32- | Implicit usings | ` enable ` |
33- | Warnings as errors | ` TreatWarningsAsErrors = true ` — ** zero warnings allowed** |
34- | Suppressed warning | ` CS1591 ` (missing XML doc) |
35- | Assembly signing | ` Key.snk ` (src projects only) |
26+ | Setting | Value |
27+ | --------------------- | ------------------------------------------------------------------------- ---|
28+ | .NET SDK | 10.0.x (` global.json ` , ` rollForward: latestMinor ` ) |
29+ | Target frameworks | ` net8.0 ` + ` net10.0 ` (library); ` net8.0;net9.0;net10.0 ` (functional tests) |
30+ | C# language version | ` 12.0 ` on ` net8.0 ` , ` 14.0 ` on ` net10.0 ` |
31+ | Nullable | ` enable ` |
32+ | Implicit usings | ` enable ` |
33+ | Warnings as errors | ` TreatWarningsAsErrors = true ` — ** zero warnings allowed** |
34+ | Suppressed warning | ` CS1591 ` (missing XML doc) |
35+ | Assembly signing | ` Key.snk ` (src projects only) |
3636
3737The generator project targets ` netstandard2.0 ` only (Roslyn analyzers requirement).
3838
@@ -98,18 +98,18 @@ Use file-scoped namespaces (`namespace Foo;`) in all new files **except** when t
9898## Testing Guidelines
9999
100100### Test projects and frameworks
101- | Project | Framework | Library |
102- | ---| ---| ---|
103- | ` Generator.Tests ` | xUnit 2 | ` Verify.Xunit ` snapshot testing |
104- | ` FunctionalTests ` | xUnit 2 + ScenarioTests | ` Verify.Xunit ` + ` Microsoft.EntityFrameworkCore.SqlServer ` |
105- | ` Tests ` | xUnit 2 | plain assertions |
101+ | Project | Framework | Library |
102+ | -------------------| --------------------------| --------------------------------------------------------------|
103+ | ` Generator.Tests ` | xUnit v3 | ` Verify.XunitV3 ` snapshot testing for the code generator |
104+ | ` CodeFixer.Tests ` | xUnit v3 | ` Verify.XunitV3 ` snapshot testing for the code fixes |
105+ | ` FunctionalTests ` | xUnit v3 + ScenarioTests | ` Verify.XunitV3 ` + ` Microsoft.EntityFrameworkCore.SqlServer ` |
106+ | ` Tests ` | xUnit v3 | plain assertions |
106107
107- ### Verify.Xunit — snapshot testing
108+ ### Verify.XunitV3 — snapshot testing
108109
109110** Every test that calls ` Verifier.Verify(...) ` must:**
1101111 . Return ` Task ` (not ` void ` )
111- 2 . Have ` [UsesVerify] ` on the class
112- 3 . Have a corresponding ` .verified.txt ` file committed alongside the test file
112+ 2 . Have a corresponding ` .verified.txt ` file committed alongside the test file
113113
114114** Naming convention for verified files:**
115115` {ClassName}.{MethodName}.verified.txt `
@@ -223,17 +223,17 @@ $env:VERIFY_AUTO_APPROVE = "true"; dotnet test
223223
224224### Key files in ` EntityFrameworkCore.Projectables.Generator `
225225
226- | File | Responsibility |
227- | ---| ---|
228- | ` ProjectionExpressionGenerator.cs ` | ` IIncrementalGenerator ` entry point — wires up the pipeline |
229- | ` ProjectableInterpreter.cs ` (+ partials) | Converts a ` MemberDeclarationSyntax ` into a ` ProjectableDescriptor ` |
230- | ` ExpressionSyntaxRewriter.cs ` (+ partials) | Rewrites expressions: null-conditionals, enum expansions, switch expressions |
231- | ` DeclarationSyntaxRewriter.cs ` | Rewrites declarations (fully-qualified names, etc.) |
232- | ` BlockStatementConverter.cs ` | Converts block-bodied methods to expression trees |
233- | ` ProjectableDescriptor.cs ` | Pure data record describing a projectable member |
234- | ` ProjectableAttributeData.cs ` | Serializable snapshot of ` [Projectable] ` attribute values (no live Roslyn objects) |
235- | ` ProjectionRegistryEmitter.cs ` | Emits ` ProjectionRegistry.g.cs ` |
236- | ` Diagnostics.cs ` | All ` DiagnosticDescriptor ` constants (EFP0001–EFP0009) |
226+ | File | Responsibility |
227+ | -------------------------------------------- | --------------------------------------------------------------------------------- ---|
228+ | ` ProjectionExpressionGenerator.cs ` | ` IIncrementalGenerator ` entry point — wires up the pipeline |
229+ | ` ProjectableInterpreter.cs ` (+ partials) | Converts a ` MemberDeclarationSyntax ` into a ` ProjectableDescriptor ` |
230+ | ` ExpressionSyntaxRewriter.cs ` (+ partials) | Rewrites expressions: null-conditionals, enum expansions, switch expressions |
231+ | ` DeclarationSyntaxRewriter.cs ` | Rewrites declarations (fully-qualified names, etc.) |
232+ | ` BlockStatementConverter.cs ` | Converts block-bodied methods to expression trees |
233+ | ` ProjectableDescriptor.cs ` | Pure data record describing a projectable member |
234+ | ` ProjectableAttributeData.cs ` | Serializable snapshot of ` [Projectable] ` attribute values (no live Roslyn objects) |
235+ | ` ProjectionRegistryEmitter.cs ` | Emits ` ProjectionRegistry.g.cs ` |
236+ | ` Diagnostics.cs ` | All ` DiagnosticDescriptor ` constants (EFP0001–EFP0009) |
237237
238238### Incremental generator rules
239239- ** Never capture live Roslyn objects** (` ISymbol ` , ` SemanticModel ` , ` Compilation ` , ` AttributeData ` ) in the incremental pipeline transforms — they break caching. Use ` ProjectableAttributeData ` (a plain struct) instead.
@@ -243,15 +243,15 @@ $env:VERIFY_AUTO_APPROVE = "true"; dotnet test
243243
244244## Diagnostics Reference
245245
246- | ID | Severity | Title |
247- | ---| ---| ---|
248- | EFP0001 | Warning | Block-bodied member support is experimental |
249- | EFP0002 | Error | Null-conditional expression unsupported |
250- | EFP0003 | Warning | Unsupported statement in block-bodied method |
251- | EFP0004 | Error | Statement with side effects in block-bodied method |
252- | EFP0005 | Warning | Potential side effect in block-bodied method |
253- | EFP0006 | Error | Method/property should expose a body definition |
254- | EFP0007 | Warning | Non-projectable method call in block body |
246+ | ID | Severity | Title |
247+ | --------- | ---------- | ------------------------------------------------- ---|
248+ | EFP0001 | Warning | Block-bodied member support is experimental |
249+ | EFP0002 | Error | Null-conditional expression unsupported |
250+ | EFP0003 | Warning | Unsupported statement in block-bodied method |
251+ | EFP0004 | Error | Statement with side effects in block-bodied method |
252+ | EFP0005 | Warning | Potential side effect in block-bodied method |
253+ | EFP0006 | Error | Method/property should expose a body definition |
254+ | EFP0007 | Warning | Non-projectable method call in block body |
255255
256256---
257257
0 commit comments