You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 175e98a
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Resolve RS1038: Separate code fix providers into dedicated assembly (#375)
RS1038 flags assemblies containing compiler extensions (analyzers) that
reference IDE-only dependencies like
`Microsoft.CodeAnalysis.Workspaces`. Code fix providers require
Workspaces; analyzers must not reference it.
## Changes
- **New project**: `IntelliTect.Analyzer.CodeFixes` containing all code
fix providers
- **Dependency split**: Moved `Microsoft.CodeAnalysis.CSharp.Workspaces`
reference from analyzer to code fixes project; analyzer now references
only `Microsoft.CodeAnalysis.CSharp`
- **Packaging**: Both assemblies packaged to `analyzers/dotnet/cs/` in
NuGet
- **Removed**: RS1038 suppression from `.editorconfig`
## Structure
```
IntelliTect.Analyzer/ # Analyzers only, no Workspaces dependency
├── Analyzers/
│ ├── AsyncVoid.cs
│ └── ...
IntelliTect.Analyzer.CodeFixes/ # Code fix providers with Workspaces dependency
├── AsyncVoid.cs
├── AttributesOnSeparateLines.cs
└── ...
```
Both assemblies ship together in the same NuGet package and are loaded
by the IDE as needed.
> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `pe3vsblobprodcus354.vsblob.vsassets.io`
> - Triggering command: `/usr/share/dotnet/dotnet dotnet restore
--no-dependencies
/home/REDACTED/work/CodingGuidelines/CodingGuidelines/Tools/XMLtoMD/GuidelineXmlToMD.sln
--packages
/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/packages
/p:DisableImplicitNuGetFallbackFolder=true --verbosity normal
/p:TargetFrameworkRootPath=/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot
/p:NetCoreTargetingPackRoot=/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot
/p:AllowMissingPrunePackageData=true` (dns block)
> - Triggering command: `/usr/share/dotnet/dotnet dotnet restore
--no-dependencies
/home/REDACTED/work/CodingGuidelines/CodingGuidelines/Tools/XMLtoMD/GuidelineXmlToMD/GuidelineXmlToMD.csproj
--packages
/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/packages
/p:DisableImplicitNuGetFallbackFolder=true --verbosity normal
/p:TargetFrameworkRootPath=/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot
/p:NetCoreTargetingPackRoot=/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot
/p:AllowMissingPrunePackageData=true` (dns block)
> - Triggering command: `/usr/share/dotnet/dotnet dotnet restore
--no-dependencies
/home/REDACTED/work/CodingGuidelines/CodingGuidelines/Tools/XMLtoMD/GuidelineXmlToMD.Test/GuidelineXmlToMD.Test.csproj
--packages
/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/packages
/p:DisableImplicitNuGetFallbackFolder=true --verbosity normal
/p:TargetFrameworkRootPath=/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot
/p:NetCoreTargetingPackRoot=/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot
/p:AllowMissingPrunePackageData=true` (dns block)
> - `s8mvsblobprodcus38.vsblob.vsassets.io`
> - Triggering command: `/usr/share/dotnet/dotnet dotnet restore
--no-dependencies
/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/152969D1C94CACFB2DD8DDFC3D3B91A8/missingpackages_workingdir
--packages
/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/missingpackages
/p:DisableImplicitNuGetFallbackFolder=true --verbosity normal
--configfile
/home/REDACTED/work/CodingGuidelines/.codeql-scratch/dbs/csharp/working/nugetconfig/nuget.config
--force` (dns block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/IntelliTect/CodingGuidelines/settings/copilot/coding_agent)
(admins only)
>
> </details>
<!-- START COPILOT CODING AGENT SUFFIX -->
<!-- START COPILOT ORIGINAL PROMPT -->
<details>
<summary>Original prompt</summary>
> Resolve this suppression:
>
> ###############################
> # Analyzer Package Suppressions
> ###############################
> # RS1038: Compiler extensions should not be implemented in assemblies
with compiler-provided references
> # This rule is suppressed because our analyzer and code fix providers
are in the same assembly,
> # which is a common pattern. The code fix providers require
Microsoft.CodeAnalysis.Workspaces.
> dotnet_diagnostic.RS1038.severity = none
>
>
>
>
https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md
</details>
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/IntelliTect/CodingGuidelines/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
Co-authored-by: Benjamin Michaelis <git@relay.benjamin.michaelis.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
0 commit comments