-
Notifications
You must be signed in to change notification settings - Fork 46
Support enclosing ranges for Go snapshots #343
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
base: main
Are you sure you want to change the base?
Support enclosing ranges for Go snapshots #343
Conversation
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.
Overall this looks good to me.
ca16b16
to
a075e78
Compare
a075e78
to
19ba735
Compare
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.
LGTM. Please fix the remaining issues before merging.
} | ||
enclosingRanges := enclosingRanges(document.Occurrences) | ||
enclosingByStartLine := enclosingRangesByStartLine(enclosingRanges) | ||
for _, ers := range enclosingByStartLine { |
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: I'd prefer to get already sorted output from enclosingRangesBy...Line
.
}) | ||
} | ||
enclosingByEndLine := enclosingRangesByEndLine(enclosingRanges) | ||
for _, ers := range enclosingByStartLine { |
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.
range enclosingByEndLine
(but please move this to the function)
Implemented in a similar way as
scip-python
do.Examples of generated snapshots: sourcegraph/scip-go#172
For sourcegraph/scip-go#92