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

MSBuild 17.9.4 no longer reports code style errors in build #39142

Open
metoule opened this issue Mar 1, 2024 · 4 comments · May be fixed by dotnet/roslyn#73339
Open

MSBuild 17.9.4 no longer reports code style errors in build #39142

metoule opened this issue Mar 1, 2024 · 4 comments · May be fixed by dotnet/roslyn#73339
Labels
Area-Workloads untriaged Request triage from a team member

Comments

@metoule
Copy link

metoule commented Mar 1, 2024

Describe the bug

With .NET SDK 8.0.101, a project using <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> correctly reports IDE0036 (for example), while .NET SDK 8.0.200 no longer reports the error.

With MSBuild 17.8.3:

image

With MSBuild 17.9.4:

image

To Reproduce

Github repo: https://github.com/metoule/msbuild-17.9.4-editorconfig

Exceptions (if any)

Further technical details

dotnet --info

.NET SDK:
 Version:           8.0.200
 Commit:            438cab6a9d
 Workload version:  8.0.200-manifests.cdf2cc8e

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  22.04
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /usr/share/dotnet/sdk/8.0.200/

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

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

.NET SDKs installed:
  8.0.200 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

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

Download .NET:
  https://aka.ms/dotnet/download
  • IDE: dotnet build
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Workloads untriaged Request triage from a team member labels Mar 1, 2024
@KalleOlaviNiemitalo
Copy link

This looks similar to dotnet/roslyn#72865.

@metoule
Copy link
Author

metoule commented Mar 7, 2024

It's similar, except that my repro fails even if there's no mix between severity settings from dotnet_diagnostic.IDExxxx.severity and option_name = option_value:severity, as suggested by dotnet/roslyn#52991 (comment), contrary to the other issue's repro project.

@cremor
Copy link

cremor commented Mar 7, 2024

@mavasani FYI
Is this also fixed by dotnet/roslyn#72238 and #38968 ?

@js6pak
Copy link

js6pak commented Mar 7, 2024

@mavasani This is caused by GetEffectiveCustomTags only being applied in DiagnosticHelper.Create, when diagnostics like IDE0073 or IDE0036 use Diagnostic.Create directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Workloads untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants