-
Notifications
You must be signed in to change notification settings - Fork 509
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
SA1649 does not recognize RecordDeclaration for record types introduced in C# 9 #3213
Comments
📝 The analysis here should treat the record as a class |
I looked into adding it myself but wasn't familiar with how I should do it given that it is not backwards compatible with .NET 4.5.2 or .NET Standard 1.1 |
Yes, its seem that the target new needs to be at least |
Pull request #3209 shows some examples for how to handle record declarations. It shouldn't be necessary to update the project references. |
I am experiencing this bug with the latest stable StyleCop.Analyzers from nuget. Can you estimate when you will release a fix? My tfm is |
@Trolldemorted the fix is available in 1.2.0-beta.161 and newer. |
Thanks for the quick reponse! Will you release a stable version with that fix in the near future? |
There are no current plans to do so in the near future. |
How about now, since we're already on C# 10? |
Given current resources and the rate of language version updates, it's questionable whether we will be able to complete a feature audit and stabilization pass for another non-beta release. Since NuGet does not have any requirement for development dependencies to have non-pre-release versions, this is not a high priority item. |
Any chance we can get this change made as a patch to the released version? Having using packages tagged as beta in production systems raises audit flags. |
@GaTechThomas We publish a second package without the beta tag to support audit pipelines that fail to account for NuGet's explicit allowance of beta packages that do not contain any shipping content. |
…Analyzers.DocumentationRules.SA1649FileNameMustMatchTypeName' threw an exception of type 'System.ArgumentException' with message 'Unhandled declaration kind: RecordDe claration'. re: DotNetAnalyzers/StyleCopAnalyzers#3213
C# 9 introduced a new record type and the file naming SA1649 does not recognize it yet.
The text was updated successfully, but these errors were encountered: