Add code fixes for EFP0001, EFP0002 and EFP0008, with tests#181
Merged
Add code fixes for EFP0001, EFP0002 and EFP0008, with tests#181
Conversation
Remove unused dependency ScenarioTests.XUnit
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Roslyn CodeFixes project for EntityFrameworkCore.Projectables to offer fixes for generator diagnostics (EFP0001/EFP0002/EFP0008), adds a dedicated test project with Verify snapshots, and removes the unused ScenarioTests.XUnit dependency from functional tests.
Changes:
- Add
EntityFrameworkCore.Projectables.CodeFixeswith code fix providers for EFP0001, EFP0002, and EFP0008. - Add
EntityFrameworkCore.Projectables.CodeFixes.Testswith snapshot-based tests for the new code fixes. - Remove ScenarioTests.XUnit from functional tests and central package versions; wire CodeFixes into packaging/solution.
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/EntityFrameworkCore.Projectables.FunctionalTests/UseMemberBodyPropertyTests.cs | Remove unused ScenarioTests using. |
| tests/EntityFrameworkCore.Projectables.FunctionalTests/StaticMembersTests.cs | Remove unused ScenarioTests using. |
| tests/EntityFrameworkCore.Projectables.FunctionalTests/StatelessSimpleFunctionTests.cs | Remove unused ScenarioTests using. |
| tests/EntityFrameworkCore.Projectables.FunctionalTests/StatelessComplexFunctionTests.cs | Remove unused ScenarioTests using. |
| tests/EntityFrameworkCore.Projectables.FunctionalTests/StatefullSimpleFunctionTests.cs | Remove unused ScenarioTests using. |
| tests/EntityFrameworkCore.Projectables.FunctionalTests/StatefullPropertyTests.cs | Remove unused ScenarioTests using. |
| tests/EntityFrameworkCore.Projectables.FunctionalTests/StatefullComplexFunctionTests.cs | Remove unused ScenarioTests using. |
| tests/EntityFrameworkCore.Projectables.FunctionalTests/InheritedModelTests.cs | Remove unused ScenarioTests using. |
| tests/EntityFrameworkCore.Projectables.FunctionalTests/ExtensionsMethods/ExtensionMethodTests.cs | Remove unused ScenarioTests using. |
| tests/EntityFrameworkCore.Projectables.FunctionalTests/EntityFrameworkCore.Projectables.FunctionalTests.csproj | Drop ScenarioTests.XUnit; add analyzer project reference to CodeFixes. |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/VerifyInit.cs | Add Verify module initializer (AutoVerify gate + en-US culture). |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/CodeFixTestBase.cs | Add shared Roslyn code-fix test harness. |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/BlockBodyExperimentalCodeFixProviderTests.cs | Add EFP0001 code-fix tests. |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/BlockBodyExperimentalCodeFixProviderTests.AddAllowBlockBody_WhenProjectableHasNoArguments.verified.txt | Snapshot for EFP0001 fix output. |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/BlockBodyExperimentalCodeFixProviderTests.AddAllowBlockBody_WhenProjectableAlreadyHasOtherArguments.verified.txt | Snapshot for EFP0001 fix output. |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/BlockBodyExperimentalCodeFixProviderTests.ReplaceAllowBlockBody_WhenAlreadySetToFalse.verified.txt | Snapshot for EFP0001 fix output. |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/BlockBodyExperimentalCodeFixProviderTests.AddAllowBlockBody_OnBlockBodiedProperty.verified.txt | Snapshot for EFP0001 fix output. |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/NullConditionalRewriteUnsupportedCodeFixProviderTests.cs | Add EFP0002 code-fix tests. |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/NullConditionalRewriteUnsupportedCodeFixProviderTests.SetNullConditionalSupport_Rewrite.verified.txt | Snapshot for EFP0002 fix output. |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/NullConditionalRewriteUnsupportedCodeFixProviderTests.SetNullConditionalSupport_Ignore.verified.txt | Snapshot for EFP0002 fix output. |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/NullConditionalRewriteUnsupportedCodeFixProviderTests.ReplacesExistingNullConditionalRewriteSupport_WithRewrite.verified.txt | Snapshot for EFP0002 fix output. |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/NullConditionalRewriteUnsupportedCodeFixProviderTests.ReplacesExistingNullConditionalRewriteSupport_WithIgnore.verified.txt | Snapshot for EFP0002 fix output. |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/MissingParameterlessConstructorCodeFixProviderTests.cs | Add EFP0008 code-fix tests. |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/MissingParamLessConstructorCodeFixProviderTests.AddParamLessConstructor_ToClassWithSingleParamConstructor.verified.txt | Snapshot for EFP0008 fix output. |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/MissingParamLessConstructorCodeFixProviderTests.AddParamLessConstructor_ToClassWithNoOtherMembers.verified.txt | Snapshot for EFP0008 fix output. |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/MissingParamLessConstructorCodeFixProviderTests.AddParamLessConstructor_IsInsertedBeforeExistingMembers.verified.txt | Snapshot for EFP0008 fix output. |
| tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/EntityFrameworkCore.Projectables.CodeFixes.Tests.csproj | New test project for code fixes. |
| src/EntityFrameworkCore.Projectables.CodeFixes/EntityFrameworkCore.Projectables.CodeFixes.csproj | New CodeFixes project targeting netstandard2.0. |
| src/EntityFrameworkCore.Projectables.CodeFixes/ProjectableCodeFixHelper.cs | Add shared helper for locating/modifying [Projectable] attribute arguments. |
| src/EntityFrameworkCore.Projectables.CodeFixes/BlockBodyExperimentalCodeFixProvider.cs | Add EFP0001 code fix provider. |
| src/EntityFrameworkCore.Projectables.CodeFixes/NullConditionalRewriteUnsupportedCodeFixProvider.cs | Add EFP0002 code fix provider. |
| src/EntityFrameworkCore.Projectables.CodeFixes/MissingParameterlessConstructorCodeFixProvider.cs | Add EFP0008 code fix provider. |
| src/EntityFrameworkCore.Projectables.CodeFixes/AnalyzerReleases.Unshipped.md | Add analyzer release tracking file (currently empty). |
| src/EntityFrameworkCore.Projectables.CodeFixes/AnalyzerReleases.Shipped.md | Add analyzer release tracking file (currently empty). |
| src/EntityFrameworkCore.Projectables.Abstractions/EntityFrameworkCore.Projectables.Abstractions.csproj | Package CodeFixes.dll alongside Generator.dll under analyzers/dotnet/cs. |
| EntityFrameworkCore.Projectables.sln | Add CodeFixes projects to the solution (plus new solution configs). |
| Directory.Packages.props | Remove ScenarioTests.XUnit version; add Roslyn Workspaces package version. |
...workCore.Projectables.CodeFixes.Tests/MissingParameterlessConstructorCodeFixProviderTests.cs
Show resolved
Hide resolved
...orkCore.Projectables.FunctionalTests/EntityFrameworkCore.Projectables.FunctionalTests.csproj
Show resolved
Hide resolved
src/EntityFrameworkCore.Projectables.CodeFixes/ProjectableCodeFixHelper.cs
Show resolved
Hide resolved
...tityFrameworkCore.Projectables.CodeFixes/NullConditionalRewriteUnsupportedCodeFixProvider.cs
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove unused dependency ScenarioTests.XUnit