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

Unable to enforce some IDE rules on build because of EnforceOnBuild.Never #77120

Open
FrediKats opened this issue Feb 8, 2025 · 0 comments
Open
Labels
Area-IDE Feature Request untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@FrediKats
Copy link
Contributor

Brief description:

Developers cannot enable enforce on build for some IDE rules. In my case it's IDE0001 and IDE0049.
I found related TODO in code: https://github.com/dotnet/roslyn/blob/main/src/Analyzers/Core/Analyzers/EnforceOnBuildValues.cs#L134.

It's very strange for me to disallow setting "warning" or "error" severity for some rules because of performance. Developers can disable rules in case of performance issues. For example, recently we found out that IDE0005 takes about 11-14 minutes (out of 18 minutes for all analyzers) of build time in our solution. And we successfully disabled only this rule.

Maybe it's better to change all EnforceOnBuild.Never to EnforceOnBuild.WhenExplicitlyEnabled?

cc: @mavasani

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Feature Request untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

1 participant