-
Notifications
You must be signed in to change notification settings - Fork 480
General cleanup #5252
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
General cleanup #5252
Conversation
| public static bool IsPortedFxCopRule(DiagnosticDescriptor diagnosticDescriptor) | ||
| { | ||
| var result = diagnosticDescriptor.CustomTags.Any(t => t == PortedFromFxCop); | ||
| Debug.Assert(!result || diagnosticDescriptor.Id.StartsWith("CA", StringComparison.OrdinalIgnoreCase)); | ||
| return result; | ||
| } |
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.
This is not currently used.
It may have been used in the deleted FxCopAnalyzers.sln.
Codecov Report
@@ Coverage Diff @@
## main #5252 +/- ##
==========================================
+ Coverage 95.56% 95.57% +0.01%
==========================================
Files 1281 1281
Lines 296544 296504 -40
Branches 18096 18088 -8
==========================================
- Hits 283378 283370 -8
+ Misses 10705 10684 -21
+ Partials 2461 2450 -11 |
Evangelink
left a comment
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.
Nice cleanup @Youssef1313
| public const string MicrosoftCodeAnalysisDiagnosticsSyntaxNodeAnalysisContext = "Microsoft.CodeAnalysis.Diagnostics.SyntaxNodeAnalysisContext"; | ||
| public const string MicrosoftCodeAnalysisDiagnosticsSyntaxTreeAnalysisContext = "Microsoft.CodeAnalysis.Diagnostics.SyntaxTreeAnalysisContext"; | ||
| public const string MicrosoftCodeAnalysisHostMefMefConstruction = "Microsoft.CodeAnalysis.Host.Mef.MefConstruction"; | ||
| public const string MicrosoftCodeAnalysisLocalizableString = "Microsoft.CodeAnalysis.LocalizableString"; |
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.
@mavasani Do you think the code style repo would accept a suggestion for an analyzer that sorts members by name? Shall we do something specific to WellKnownTypeNames?
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.
@Evangelink I think StyleCop might already have such an analyzer. Feel free to open an issue on Roslyn otherwise.
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.
Can we enable FxCop on this repo?
| generator.InvocationExpression( | ||
| generator.MemberAccessExpression( | ||
| generator.TypeExpression(semanticModel.Compilation.GetSpecialType(SpecialType.System_Object)), | ||
| generator.TypeExpression(SpecialType.System_Object), |
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 guess that's a new API on roslyn side? I don't know why we would have gone through this more complex syntax otherwise.
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.
@Evangelink Both APIs were introduced in 3.0.0. I think this approach was taken since this is the first overload shown by IntelliSense?
Co-authored-by: Amaury Levé <[email protected]>
|
Important before merging: This may regress respecting user preferences for Converting to a draft for now. |
|
@Youssef1313 Is this PR ready? |
|
Ping @Youssef1313 |
1 similar comment
|
Ping @Youssef1313 |
I haven't yet looked at this unfortunately. |
|
@Youssef1313 Thanks for the heads-up! |
|
For reference, dotnet/roslyn#55004 was what revealed the potential problem with this PR. We can still take the small parts of this PR that doesn't use I opened dotnet/roslyn#57867 on roslyn side. |
|
@mavasani @Evangelink Sorry for the delay. I reverted the potentially problematic changes. |
Closes #5251