-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Fix find all references for salsa #6632
Conversation
Where are the tests for this change? |
looks good. please add some tests. |
… fixFindAllRefForSalsa
@DanielRosenwasser @mhegazy @RyanCavanaugh any further comments? |
… fixFindAllRefForSalsa
return getSymbolOfNode(entityName.parent); | ||
case SpecialPropertyAssignmentKind.ThisProperty: | ||
case SpecialPropertyAssignmentKind.ModuleExports: | ||
return getSymbolOfNode(entityName.parent.parent); |
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.
I assume in most cases it won't be a "specialPropertyAssignmentKind" and you will just fall through here? Can you make this clear in the code by explicitly adding a default:
with just a comment to this effect, or wrapping the switch
in an if(specialPropertyAssignmentKind...)
?
Added a couple of comments. Looks 👍 to me after that. |
////var t = mod./**/[|area|](10); | ||
|
||
goTo.marker(); | ||
verify.renameLocations(false, 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.
Add a leading comment for each false
There are no tests for find all refs/rename locs at declaration sites - is this because it doesn't work right now? If it does work, can you add tests? Either way, can you rename the tests and add a numbered suffix? |
Fix find all references for salsa
Issue:

currently "find all reference" would return no results if called on exported properties in JavaScript file. For example:
After the fix:
