Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certain .editorconfig rules are ignored in 8.0.200 and newer versions #72865

Open
Tiberriver256 opened this issue Feb 23, 2024 · 7 comments
Open
Assignees
Labels
Milestone

Comments

@Tiberriver256
Copy link

Describe the bug

I have an .editorconfig file in a sub folder of my project with the following rule:

dotnet_diagnostic.IDE0022.severity = none

When I'm on SDK version 8.0.102 that rule works and is ignored.
When I'm on SDK version 8.0.200 or 8.0.201 I see the error:

image

To Reproduce

https://github.com/Tiberriver256/dotnet-802-editor-config-ignored-issue

The repo above should have IDE0022 shown in build errors. Change the sdk.version in the global.json to 8.0.102 to see the error go away.

Exceptions (if any)

N/A

Further technical details

The error shows whether I use Visual Studio, Visual Studio Code, or dotnet build.

It isn't broken for all rules. I can override CA1852 just fine.

.NET SDK:
 Version:           8.0.201
 Commit:            4c2d78f037
 Workload version:  8.0.200-manifests.e575128c

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19045
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\8.0.201\

.NET workloads installed:
There are no installed workloads to display.

Host:
  Version:      8.0.2
  Architecture: x64
  Commit:       1381d5ebd2

.NET SDKs installed:
  3.1.426 [C:\Program Files\dotnet\sdk]
  6.0.127 [C:\Program Files\dotnet\sdk]
  6.0.419 [C:\Program Files\dotnet\sdk]
  7.0.313 [C:\Program Files\dotnet\sdk]
  8.0.101 [C:\Program Files\dotnet\sdk]
  8.0.200 [C:\Program Files\dotnet\sdk]
  8.0.201 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  C:\my\personal\dotnet-802-editor-config-ignored-issue\global.json

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Feb 23, 2024
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@KalleOlaviNiemitalo
Copy link

Related to #72094?

@steve-a-jones
Copy link

Similar issue here for 8.0.202. A context action for "fix formatting" was no longer showing up in Rider after upgrading from 8.0.101.

I noticed that no *.editorconfig files were present within 8.0.202/Sdks/Microsoft.NET.Sdk/codestyle/cs/build/config/

$ ls ./8.0.202/Sdks/Microsoft.NET.Sdk/codestyle/cs/build/config
analysislevelstyle_all.globalconfig
analysislevelstyle_none.globalconfig
analysislevelstyle_default.globalconfig
analysislevelstyle_recommended.globalconfig
analysislevelstyle_minimum.globalconfig

Here is what this looks like for 8.0.101:

$ ls ./8.0.101/Sdks/Microsoft.NET.Sdk/codestyle/cs/build/config
analysislevelstyle_all.editorconfig
analysislevelstyle_default.editorconfig
analysislevelstyle_minimum.editorconfig
analysislevelstyle_none.editorconfig
analysislevelstyle_recommended.editorconfig

New to dotnet so I might be stating the obvious but will be switching back to 8.0.101 for the time being.

@baronfel
Copy link
Member

baronfel commented Apr 3, 2024

@jaredpar is this something that we should transfer to roslyn?

@jaredpar jaredpar transferred this issue from dotnet/sdk Apr 3, 2024
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@arunchndr arunchndr removed the untriaged Issues and PRs which have not yet been triaged by a lead label Apr 19, 2024
@arunchndr arunchndr added this to the 17.11 milestone Apr 19, 2024
@arunchndr
Copy link
Member

This one is related to another issue that Todd is looking at.

@js6pak
Copy link
Contributor

js6pak commented May 4, 2024

Actually this issue is just a duplicate of #72094

@arunchndr arunchndr modified the milestones: 17.11, Backlog Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants