dotnet / dotnet/vscode-csharp

"Fix all occurrences of a code issue..." lists different issues then in the problems tab.

Open
#4,119 4 comments 2 reactions 0 assignees View on GitHub
OmniSharp
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
17h 56m
Merged PRs (30d)
21

Description

## Issue Description ##
I'm using .editorconfig to disable some rules. This works fine for the problems reported, however when I run any of the "Fix all occurrences of a code issue..." from the command palette it sees and will apply disabled rules as valid options.
## Steps to Reproduce ##
1. Enable Roslyn analyzers and editor config support.
2. Set a dotnet_diagnostic severity to none.
3. Bring up an example file that should trigger the rule.
4. Open the command palette and run a "Fix all occurrences of a code issue..." command. It should bring up a list that includes the disabled rule.

## Expected Behavior ##
I expect that the disabled rules do not appear or apply.

## Actual Behavior ##
The disabled rules do appear and will apply. This is particularly annoying for "fix all issues".

## Logs ##

### OmniSharp log ###
N/a - but it will list that it "fixing" the disabled rules in the log.

### C# log ###
N/a

## Environment information ##

**VSCode version**: 1.50.1
**C# Extension**: 1.23.3

Dotnet Information
.NET Core SDK (reflecting any global.json):
Version: 3.1.302
Commit: 41faccf259

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19041
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.302\

Host (useful for support):
Version: 3.1.6
Commit: 3acd9b0cd1

.NET Core SDKs installed:
3.1.302 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions

|Extension|Author|Version|
|---|---|---|
|awesome-vhdl|puorc|0.0.1|
|csharp|ms-dotnettools|1.23.3|
|debugger-for-chrome|msjsdiag|4.12.11|
|EditorConfig|EditorConfig|0.15.1|
|gml-support|liaronce|1.7.2|
|markdown-mermaid|bierner|1.8.1|
|mermaid-markdown-syntax-highlighting|bpruitt-goddard|1.0.3|
|python|ms-python|2020.9.114305|
|unity-debug|Unity|2.7.5|
|vscode-eslint|dbaeumer|2.1.10|
|vscode-icons|vscode-icons-team|11.0.0|
|vscode-nuget-package-manager|jmrog|1.1.6|;

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.