-
Notifications
You must be signed in to change notification settings - Fork 2
Diagnostic bug fixes (and snapshot tests) #100
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
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
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.
Quick and dirty solution to snapshots for diagnostic data. I'd prefer the source annotation approach that scip snapshot
implements
Considering either contributing back to scip snapshot
or just implementing a custom solution to this problem, but in the meantime this will let us track changes to diagnostics
SymbolMetadata getSymbolMetadata( | ||
Element element, | ||
AstNode node, | ||
int offset, |
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.
the specific node
we pass in here isn't always the offset of the specific entity. For example, some elements are indexed by some analyzed element
instead of the ast node at the specific depth
For this reason, just pass the offset as an int, so the errors can be correctly calculated where necessary
QA +1
|
🚀 @Workiva/release-management-p 🚢 |
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
Closes #98 |
Added some rough snapshot tests for the diagnostics functionality that was recently added #98
When adding these, it was discovered that the reported diagnostics were not accurate, and there was a core bug in its implementation (using the wrong offset when finding which error was associated with the symbol). This bug was fixed in this PR as well