-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Classify string fields with embedded languages if we can see their values passed to a StringSyntax api #77199
Classify string fields with embedded languages if we can see their values passed to a StringSyntax api #77199
Conversation
…lues passed to a StringSyntax api
|
||
var block = tokenParent.AncestorsAndSelf().FirstOrDefault(blockFacts.IsExecutableBlock); | ||
if (block is null) | ||
return false; | ||
|
||
var localName = localSymbol.Name; | ||
if (localName == "") | ||
return false; |
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.
pulled into pattern match above.
foreach (var descendent in statement.DescendantNodesAndSelf()) | ||
{ | ||
cancellationToken.ThrowIfCancellationRequested(); | ||
if (CheckDescendants(localSymbol, semanticModel, statement, cancellationToken, out identifier)) |
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.
extracted into helper. we use it for the field case as well.
@@ -1312,4 +1312,70 @@ void Goo() | |||
Namespace("RegularExpressions"), |
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.
view with whitespace off.
Fixes #77189