dotnet / msbuild

The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
https://docs.microsoft.com/visualstudio/msbuild/msbuild
MIT License
5.17k stars 1.34k forks source link

[Feature Request]: Expand BuildCheck editorconfig allowable syntax #10232

Open baronfel opened 3 weeks ago

baronfel commented 3 weeks ago

Summary

EditorConfig settings for BuildChecks have rigid rules:

Background and Motivation

Ease of use/things I banged my head against today

Proposed Feature

I'd like to see:

Alternative Designs

No response

f-alizada commented 3 weeks ago

Thank you! I'm going to update the usage, however would like clarify: which values were case sensitive? Trying to reproduce:

[*.csproj]
build_check.BC0101.IsEnabled=TRUE
build_check.BC0101.SEVERITY=ERROR

And the configuration applied correctly, am I missing something?

baronfel commented 3 weeks ago

For case sensitivity I agree that the values are fine, it was the case sensitivity of the property keys that was frustrating - convention elsewhere seems to be lowercase property keys (meaning don't let .NET's Pascal case obsession leak to the editor config file).

JanKrivanek commented 6 days ago

Possibly related: https://github.com/dotnet/msbuild/issues/10315

JanKrivanek commented 5 days ago

Btw. - the:

Are tracked as https://github.com/dotnet/msbuild/issues/10097

Let's handle in either of those tickets, let's just prevent any possible duplication of efforts

f-alizada commented 5 days ago

Comment from @baronfel

Do we need IsEnabled overall in editorconfig if we are going to have support of severity=none which is equal to the IsEnabled=false

With this I do agree, and since we are in development mode I would remove the key from the infrastructure recognized keys :)