Skip to content

Conversation

@AArnott
Copy link
Member

@AArnott AArnott commented Oct 24, 2023

Fixes #1111

.Any(m =>
!m.IsObsolete() &&
m.Parameters.Skip(m.IsExtensionMethod ? 1 : 0).Any(IsImportantJtfParameter) &&
context.ContainingSymbol.FindContainingNamedOrAssemblySymbol() is ISymbol containingSymbol && context.Compilation.IsSymbolAccessibleWithin(m, containingSymbol));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider splitting each check onto it's own line.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generally like what you're proposing. This pair in particular share a line because it's really the second check that matters, but the first check is a special check that must be met before the second check can be allowed. All the 'lines' here could be in any order, but are sorted in order of runtime execution cost. So by putting these two checks on the same line, I make it easier to see that they are connected and in a particularly required order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VSTHRD012 wrongly reported on private/internal members

2 participants