-
Notifications
You must be signed in to change notification settings - Fork 2
FEA-1741: Correctly index fields #32
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
Merge Requirements Met ✅Request Rosie to automerge this pull request by including @Workiva/release-management-p in a comment. General InformationTicket(s): Code Review(s): #32
Reviewers: matthewnitschke-wk, kimlarson-wk Additional InformationWatchlist Notifications: None
Note: This is a shortened report. Click here to view Rosie's full evaluation. |
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
// When the identifier is a field, the analyzer creates synthetic getters/ | ||
// setters for it. We need to get the backing field. | ||
if (element?.isSynthetic == true && element is PropertyAccessorElement) { | ||
element = element.variable; | ||
} |
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.
#nit should we go ahead and make this an else if to avoid the unnecessary second check?
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.
In this case, its necessary to hit both
the CompoundAssignmentExpression
is to get the correct ast node, it can assign the element to be PropertyAccessorElement
And if element is PropertyAccessorElement
in any case, we want its variable
, not it's element node
Its a bit strange, but we're bound to the criteria of the ast/static analysis by a lot of this stuff
QA +1 Verified generated scip files are correct, and no regressions exist in snapshots |
@Workiva/release-management-pp ready for merge. |
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.
+1 from RM
FEA-1741
There has been a longstanding issue with scip-dart where fields are not correctly indexed due to the synthetic
get/set
elements which are backing every fieldThis pr takes into account this edge case, pulling from the examples in deprecatalog and lsif_indexer