This repository was archived by the owner on Sep 30, 2024. It is now read-only.
chore: Move and clean up test code for syntactic usages#64318
Merged
Conversation
38a0012 to
186d52d
Compare
3 tasks
added 3 commits
August 7, 2024 08:31
The tests in here no longer reference the service
186d52d to
06a15a4
Compare
Comment on lines
+178
to
+187
| func (t fakeTranslator) TranslateRange(ctx context.Context, from, to api.CommitID, path core.RepoRelPath, r scip.Range) (core.Option[scip.Range], error) { | ||
| numLines := t.numLines | ||
| if from == t.to && to == t.from { | ||
| numLines = -numLines | ||
| } | ||
| if t.shouldFail(path, r) { | ||
| return core.None[scip.Range](), nil | ||
| } | ||
| return core.Some(shiftSCIPRange(r, numLines)), nil | ||
| } |
Contributor
There was a problem hiding this comment.
nit: r is perhaps too short, may be rng or range.
eventually would be good to kill of the "single letter receiver parameter" convention as well
Contributor
Author
There was a problem hiding this comment.
I'll have you know that I'm a big believer in one character variable names 😄
range is a keyword, but I'll change it to range_ in one of the follow-up PRs.
antonsviridov-src
approved these changes
Aug 7, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consolidates the two test helper/util modules, and moves one test file to align with the file it's actually testing.
Test plan
Tests continue to pass