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

SA1201 analyzer throws exception #3526

Closed
Siphonophora opened this issue Jun 17, 2022 · 4 comments
Closed

SA1201 analyzer throws exception #3526

Siphonophora opened this issue Jun 17, 2022 · 4 comments

Comments

@Siphonophora
Copy link

Hello, I have been running into an exception from style cop. The message is below and a minimized example of the bug is here: https://github.com/Siphonophora/StyleCop-AD0001-exception/blob/main/StyleCopIssue/UnitTest1.cs#L11-L14

Its the nested record above that seems to be the source of the issue. though the other method in the class needs to be there too.

CSC : warning AD0001: Analyzer 'StyleCop.Analyzers.OrderingRules.SA1201ElementsMustAppearInTheCorrect
Order' threw an exception of type 'System.Collections.Generic.KeyNotFoundException' with message 'The
 given key 'RecordDeclaration' was not present in the dictionary.'. [\StyleCop-AD0001-exception\StyleCopIssue\StyleCopIssue.csproj]
@bjornhellander
Copy link
Contributor

I see that you are using version 1.1.118, which is rather old. This seems to be fixed in PR #3264, which is included in 1.2.0-beta304 and later versions.

@Siphonophora
Copy link
Author

@bjornhellander Thanks, This does work on the beta. Is 1.2.0 coming out of beta at some point? Its been a while

@sharwell
Copy link
Member

@Siphonophora there are no plans to drop the prerelease suffix in the immediate future. NuGet doesn't require development dependencies to have stable version numbers, and the C# language is progressing faster than the stabilization process for this repository. We don't have the incentive or resources necessary to alter the current approach.

@sharwell
Copy link
Member

Duplicate of #3270

@sharwell sharwell marked this as a duplicate of #3270 Jun 22, 2022
@sharwell sharwell closed this as not planned Won't fix, can't repro, duplicate, stale Jun 22, 2022
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

3 participants