Roslyn RS1038 Fix#140
Merged
Merged
Conversation
Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
Contributor
There was a problem hiding this comment.
Pull request overview
Resolves Roslyn warning RS1038 by splitting compiler-loaded analyzers from IDE-only code fixes, aligning Light.GuardClauses’ internal Roslyn tooling with the standard analyzer/code-fix assembly separation pattern.
Changes:
- Updated
Light.GuardClauses.InternalRoslynAnalyzersto reference compiler-layer Roslyn (Microsoft.CodeAnalysis.CSharp) instead of Workspaces. - Introduced
Light.GuardClauses.InternalRoslynAnalyzers.CodeFixesproject containing the two code fix providers and pinned its Workspaces dependency to 4.11.0 viaVersionOverride. - Wired the new CodeFixes assembly into the product project as an analyzer reference, updated the analyzer tests project reference, updated central package versioning documentation, and added the new project to the solution.
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tools/analyzers/Light.GuardClauses.InternalRoslynAnalyzers/Light.GuardClauses.InternalRoslynAnalyzers.csproj | Removes Workspaces dependency and switches to compiler-layer Microsoft.CodeAnalysis.CSharp to eliminate RS1038. |
| tools/analyzers/Light.GuardClauses.InternalRoslynAnalyzers.CodeFixes/Light.GuardClauses.InternalRoslynAnalyzers.CodeFixes.csproj | New CodeFixes project with Workspaces pinned to 4.11.0 and a project reference to the analyzer assembly. |
| tools/analyzers/Light.GuardClauses.InternalRoslynAnalyzers.CodeFixes/ParameterNameXmlCommentFix.cs | Moves/introduces the parameter-name XML comment code fix into the IDE-only project. |
| tools/analyzers/Light.GuardClauses.InternalRoslynAnalyzers.CodeFixes/MessageXmlCommentFix.cs | Moves/introduces the message XML comment code fix into the IDE-only project. |
| tests/Light.GuardClauses.InternalRoslynAnalyzers.Tests/Light.GuardClauses.InternalRoslynAnalyzers.Tests.csproj | Repoints tests to the CodeFixes project so Workspaces types are available without relying on the analyzer assembly. |
| src/Light.GuardClauses/Light.GuardClauses.csproj | Adds the CodeFixes project as an analyzer reference alongside the existing analyzer reference. |
| Light.GuardClauses.sln | Adds the new CodeFixes project and places it under the existing tools/analyzers solution folder hierarchy. |
| Directory.Packages.props | Removes project-conditional override, documents the Roslyn/SDK pin rationale, and centrally pins Microsoft.CodeAnalysis.CSharp to 4.11.0. |
| ai-plans/0139-roslyn-RS1038-fix.md | Adds the tracked plan documenting rationale, acceptance criteria, and the implemented split approach. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Closes #139
PR strictly follows the corresponding plan.