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

Conditional editorconfig #66

Open
ADD-Eugenio-Lopez opened this issue May 19, 2022 · 0 comments
Open

Conditional editorconfig #66

ADD-Eugenio-Lopez opened this issue May 19, 2022 · 0 comments

Comments

@ADD-Eugenio-Lopez
Copy link

We are trying to conditionally add an editoconfig to our projects. Our first idea was the possibility of adding the editorconfig at the project level under an MSBuild variable. If the condition was met, the editorconfig file (located in another folder) was added as a link to the project.

Example of adding editorconfig at the project level on demand:

<ItemGroup Condition=” $(AnalyzeAutoGeneratedCode) == ‘true’ “>

Since it doesn't work at the project level, we thought we'd add the editorconfig at the solution level. The problem is that we don't know how to add it conditionally.

Our intention would be to include an editorconfig file at the solution level that contains these exclusions, but that depends on some MSBuild variable to be able to configure it according to the needs of the programmers:

If (someVariable) # this code is the one we would like to add.
[/fakes/.cs]
dotnet_diagnostic.S1128.severity = none
dotnet_diagnostic.cs1591.severity = none
endif # this code is the one we would like to add.

Is there any way to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant