Skip to content

Do not execute RemoveUnnecessaryInlineSuppressions on generated code#46092

Merged
mavasani merged 1 commit intodotnet:masterfrom
mavasani:IDE0079_GeneratedCode
Jul 17, 2020
Merged

Do not execute RemoveUnnecessaryInlineSuppressions on generated code#46092
mavasani merged 1 commit intodotnet:masterfrom
mavasani:IDE0079_GeneratedCode

Conversation

@mavasani
Copy link
Contributor

Fixes #46075

@mavasani mavasani added this to the 16.8.P1 milestone Jul 17, 2020
@mavasani mavasani requested review from a team and jmarolf July 17, 2020 17:12
position, includeSkipped, includeDirectives, includeDocumentationComments);
}

public static bool IsGeneratedCode(this SyntaxTree syntaxTree, AnalyzerOptions? analyzerOptions, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existing code just moved down to shared analyzers layer.

@@ -28,18 +28,8 @@ public async Task<bool> IsGeneratedCodeAsync(Document document, CancellationToke

private static bool IsGeneratedCode(SyntaxTree syntaxTree, Document document, CancellationToken cancellationToken)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❔ Can we inline this to avoid duplication?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure I understood, what part of duplication is avoided by inlining? This is invoked at couple of places above.

@mavasani mavasani merged commit 2a69ac3 into dotnet:master Jul 17, 2020
@ghost ghost modified the milestones: 16.8.P1, Next Jul 17, 2020
@mavasani mavasani deleted the IDE0079_GeneratedCode branch July 17, 2020 21:44
@JoeRobich JoeRobich modified the milestones: Next, 16.8.P1 Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not report IDE0079 (Remove unnecessary suppressions) on generated code

4 participants