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

EnableGenerateDocumentationFile analyzer is a breaking change #70460

Closed
jaredpar opened this issue Oct 19, 2023 · 4 comments
Closed

EnableGenerateDocumentationFile analyzer is a breaking change #70460

jaredpar opened this issue Oct 19, 2023 · 4 comments
Assignees
Milestone

Comments

@jaredpar
Copy link
Member

The diagnostic added in #58835 is an unconditional diagnostic that fires on existing code. That means it represents a breaking change to customers when upgrading to a new version of the .NET SDK toolset. This was discovered by 1P customers trying to upgrade and represents a blocker for them. This diagnostic needs to be conditioned on a warning version at the least.

@jaredpar jaredpar added this to the 17.8 milestone Oct 19, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Oct 19, 2023
@sharwell
Copy link
Member

It seems straightforward to condition this on warning version.

Note that this is already conditioned on two separate non-default configurations being applied by the customer (explicitly enabling code style diagnostics on build, and explicitly raising the severity of IDE0005 to warning or greater).

@rainersigwald
Copy link
Member

rainersigwald commented Oct 19, 2023

explicitly raising the severity of IDE0005 to warning or greater

In the internal codebase in question it appears to be configured (via .ruleset) to Info.

This was overridden back up to Warning by other configuration.

@sharwell
Copy link
Member

sharwell commented Oct 19, 2023

EnableGenerateDocumentationFile only reports a diagnostic when IDE0005 is configured to warning or greater (the default is lower severity, and will not result in a warning).

var effectiveSeverity = _classificationIdDescriptor.GetEffectiveSeverity(compilation.Options, tree, context.Options);
if (effectiveSeverity is ReportDiagnostic.Warn or ReportDiagnostic.Error)
{
context.ReportDiagnostic(Diagnostic.Create(s_enableGenerateDocumentationFileIdDescriptor, Location.None));
}

@arunchndr arunchndr removed the untriaged Issues and PRs which have not yet been triaged by a lead label Oct 19, 2023
@arunchndr
Copy link
Member

cc: @mavasani

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

No branches or pull requests

4 participants