-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Adding Microsoft.CodeAnalysis.BannedApi as suggested for SignalR MessagePackHubProtocol #18290
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
Comments
Given MessagePack-CSharp/MessagePack-CSharp#769, is this just a matter of installing and enabling the new analyzers now? @AArnott are the analyzers available to use? |
that was related :#18291 i'm not sure i understand how it's supposed to work |
I think the idea is that the MessagePack-CSharp project will produce their own set of analyzers. So ideally we would just add a reference to the analyzers they are producing and enable them. But that's why I want to check in with @AArnott. |
Yes, 2.1.80 of the MessagePackAnalyzer package supports this. Make sure MsgPack001 and MsgPack002 are enabled. The rest can be disabled if you want as they're irrelevant. |
Cool, so we just need to add a reference and enable the analyzers. Thanks! |
@AArnott I'm trying to understand if i should re-use the |
Yes, I would reuse the same msbuild property for both versions. |
Should this be closed + milestone associated ? |
Closing makes sense to me. |
i wonder if i close it the current milestone needs/will be changed ^^ (cc @anurse ) |
Thanks @tebeco 😄 |
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
I was trying to do update
MessagePack
to2.0.x
but as few things changed like the introduction ofMessagePackSerializerOptions
.As i forgot to properly instantiate it @AArnott suggested here to use
Microsoft.CodeAnalysis.BannedApi
:Describe the solution you'd like
Trying to check if such analyzer makes sense and could be used here
Additional context
As i'm submitting this issue, i began to read :
MessagePack-CSharp/MessagePack-CSharp#534
MessagePack-CSharp/MessagePack-CSharp#533
https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.BannedApiAnalyzers/Microsoft.CodeAnalysis.BannedApiAnalyzers.md
https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.BannedApiAnalyzers/BannedApiAnalyzers.Help.md
https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format
But i'm not sure how to setup properly this analyzer to be honest.
Especially since the
Banned Methods
forMessagePack
are one with either/bothref
andoptional parametters
so i'm not sure it's going to kicks in properlyThe text was updated successfully, but these errors were encountered: