-
Notifications
You must be signed in to change notification settings - Fork 470
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
SealInternalTypes (CA1852): Don't warn for top-level type #6278
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8e90e88
to
5f61625
Compare
stephentoub
approved these changes
Nov 17, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@mavasani @stephentoub Is this ready to merge? It would be good to have this merged before the stable release (#6285) |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6278 +/- ##
=======================================
Coverage 96.05% 96.05%
=======================================
Files 1364 1364
Lines 313686 313698 +12
Branches 10125 10125
=======================================
+ Hits 301322 301337 +15
+ Misses 9943 9941 -2
+ Partials 2421 2420 -1 |
3 tasks
amis92
added a commit
to BSData/gallery-dashboard
that referenced
this pull request
Feb 2, 2023
This rule is currently being incorrectly applied to the generated `Program` class [1] and therefore has to be suppressed manually. A fix [2] has already been committed to the Roslyn Analyzers repo once that fix has been included in a future SDK update. [1] dotnet/roslyn-analyzers#6141 [2] dotnet/roslyn-analyzers#6278
jhartmann123
pushed a commit
to jhartmann123/roslyn-analyzers
that referenced
this pull request
Feb 22, 2023
* SealInternalTypes (CA1852): Don't warn for top-level type * Fix build errors
smfeest
added a commit
to smfeest/buttercup
that referenced
this pull request
Mar 5, 2023
As mentioned in the previous commit, .NET 7 includes a new analyzer [1] that checks for internal types that can be sealed. Unfortunately that analyzer is currently generating false positives for generated `Program` classes [2] and therefore has to be suppressed manually. A fix [3] has already been committed to the Roslyn Analyzers repo so we should be able to remove this suppression once that fix has made its way into an SDK update. [1] dotnet/roslyn-analyzers#5594 [2] dotnet/roslyn-analyzers#6141 [3] dotnet/roslyn-analyzers#6278
buyaa-n
pushed a commit
that referenced
this pull request
Mar 10, 2023
) * SealInternalTypes (CA1852): Don't warn for top-level type * Fix build errors Co-authored-by: Youssef Victor <[email protected]>
smfeest
added a commit
to smfeest/buttercup
that referenced
this pull request
Nov 19, 2023
The bug [1] that made adding this suppression [2] necessary has been fixed [3] in .NET 8. [1] dotnet/roslyn-analyzers#6141 [2] 5a4dc3d [3] dotnet/roslyn-analyzers#6278
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #6141