-
Notifications
You must be signed in to change notification settings - Fork 832
Add 'RemoveUnusedBinding' code fixer #11289
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
|
This is ready for review |
| let! sourceText = document.GetTextAsync(context.CancellationToken) | ||
|
|
||
| let! parsingOptions, _ = projectInfoManager.TryGetOptionsForEditingDocumentOrProject(document, context.CancellationToken, userOpName) | ||
| let! parseResults = checker.ParseFile(document.FilePath, sourceText.ToFSharpSourceText(), parsingOptions, userOpName = userOpName) |> liftAsync |
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 recommend to use ParseDocument instead of ParseFile.
ParseFile is fine, but lately we've been consolidating parsing and checking documents through extensions to the FSharpChecker, which ParseDocument is one of those extensions.
TIHan
left a comment
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.
This looks good to me, one minor comment about ParseFile.
|
I'll merge this in and do a PR for this and several other code fixers that use ParseFile. |
|
Opened #11337 |
Local bindings:
Function bindings:
It won't trigger where it shouldn't.