-
Notifications
You must be signed in to change notification settings - Fork 468
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
Bump code style package to 3.9.0 #4919
Changes from 1 commit
3ddef5a
50f52d0
fdf412e
d088552
f0b73f6
68b9d1f
47e3fd2
3e48a3e
0a2f9e6
42cc679
9b7f4f7
c7c62aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -354,7 +354,7 @@ private static bool IsOnObsoleteMemberChain(ISymbol symbol, WellKnownTypeProvide | |
while (symbol != null) | ||
{ | ||
allAttributes.AddRange(symbol.GetAttributes()); | ||
symbol = symbol is IMethodSymbol method && method.AssociatedSymbol != null | ||
symbol = symbol is IMethodSymbol { AssociatedSymbol: not null } method | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a manual change. The codefix produces invalid code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Has the bug been filed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, this is dotnet/roslyn#51691. |
||
? method.AssociatedSymbol : | ||
symbol.ContainingSymbol; | ||
} | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -193,7 +193,9 @@ public static ImmutableArray<IOperation> GetTopmostExplicitDescendants(this IOpe | |||||
/// </summary> | ||||||
public static bool IsOperationNoneRoot(this IOperation operation) | ||||||
{ | ||||||
#pragma warning disable IDE0078 // Use pattern matching - https://github.com/dotnet/roslyn/issues/51691 | ||||||
return operation.Kind == OperationKind.None && operation.Parent == null; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💭
Suggested change
|
||||||
#pragma warning restore IDE0078 // Use pattern matching | ||||||
} | ||||||
|
||||||
/// <summary> | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,8 +122,7 @@ internal static bool IsSupportedType(ITypeSymbol type, [NotNullWhen(returnValue: | |
valueTypeSymbol = type; | ||
return true; | ||
} | ||
else if (type is INamedTypeSymbol namedTypeSymbol | ||
&& namedTypeSymbol.EnumUnderlyingType != null) | ||
else if (type is INamedTypeSymbol { EnumUnderlyingType: not null } namedTypeSymbol) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a manual change. The codefix produces invalid code. |
||
{ | ||
valueTypeSymbol = namedTypeSymbol.EnumUnderlyingType; | ||
return true; | ||
|
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.
❔ Is this not the same?
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.
@sharwell There are actually more IDE0078 violations than the ones I suppressed. Some of them are actionable like you suggested, and others doesn't seem to be actionable. I'm thinking of setting the rule to silent for now until the analyzer and codefix bugs are fixed to avoid the many suppressions and manual fixes. Would you be okay with that?
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.
Certainly