-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Use Microsoft.CodeAnalysis.PublicApiAnalyzers #24188
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
Conversation
public static string GetPathByAction( | ||
#pragma warning restore RS0026 // Do not add multiple public overloads with optional parameters |
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.
@ajaybhargavb @JamesNK I realize this and src/Mvc/Mvc.Core/src/Routing/PageLinkGeneratorExtensions.cs aren't particularly new. But, can this problem be addressed and not suppressed without breaking back-compat❔ If not, do you suggest we take the hit now❔
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.
The only way to resolve the warning is changing method signatures which is a breaking change.
I don't know of any issues caused by the overloads. Suppressing is fine.
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.
I would recommend using attribute-style suppressions for methods, with the Justification set to "Required to maintain compatibility".
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.
That seems to work but VS tends to crash or ignore me when using attribute suppressions for this issue. I eventually got it to fix one instance and copied my brand new attribute everywhere else. Something may be busted in this area.
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.
LGTM
I suggest that once we fork for RC1, we move all of those items to the |
Agreed. Should I disable any other warnings from https://github.com/dotnet/roslyn-analyzers/blob/master/src/PublicApiAnalyzers/Microsoft.CodeAnalysis.PublicApiAnalyzers.md in the meantime❔ In my next PR, I need to
|
I don't think we want to disable any of the other warnings. |
c8d9e16
to
700ed88
Compare
Issue about the second item on my list is #24347. Please help if you have time. |
A new version of Microsoft.CodeAnalysis.PublicApiAnalyzers containing @mavasani's dotnet/roslyn-analyzers#3916 improvement will address the last item on my list. We'll pick that up when it's ready. Note: The new package will make missing Good news is we can probably delete aspnetcore/eng/targets/CSharp.Common.targets Lines 23 to 30 in 0437117
|
Hmm, probably need to keep the |
Yes, that sounds correct. |
nit: sort
@(LatestPackageReference)
a bit better