Repository navigation
Remove unused RangeSearchBufferMeters constant - #1896
aaronbrethorst merged 1 commit into
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Remove unused constant internal/models/constants.go |
The exported RangeSearchBufferMeters constant was removed. |
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Refactor
Possibly related PRs
- OneBusAway/maglev#1873: This PR removed the constant’s only caller,
getDistanceAlongShapeInRange.
Suggested labels: follows-template
Suggested reviewers: 3rabiii, aaronbrethorst
Merge Risk: 
Minimal · previous review 8cae5
-
No merge-blocking risk is identified for this constant removal.
Pre-merge checks: 
5
-
Full details: Description check
-
Explanation
The description includes the issue reference, change summary, root cause, testing details, and completed checklist. It correctly omits the response comparison because the change does not affect Java-served responses. The testing section summarizes results rather than including full command output, but the description is otherwise complete.
Full details: Linked Issues check
-
Explanation
Issue
#1895requires deletion ofmodels.RangeSearchBufferMetersand its comment frominternal/models/constants.go. The whole-PR summary records removal of the constant and its three-line declaration, which includes the comment. No additional coding requirements are defined.
Full details: Out of Scope Changes check
-
Explanation
The reported change only removes the unused constant and its comment from
internal/models/constants.go. This change directly implements issue#1895and shows no unrelated code, test, or documentation changes.
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files.
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Its only caller, getDistanceAlongShapeInRange, was removed in OneBusAway#1873. Fixes OneBusAway#1895
8cae50c to
2acd051
Compare
|
aaronbrethorst
left a comment
There was a problem hiding this comment.
Thanks @chikolavosaki-sys, this is a nice, clean follow-up to #1873. I checked that nothing else still uses the constant. That includes the open GTFS-Flex stack (#1481-#1485) and the other open PRs. The only references are in branches cut before #1873, and they come from the getDistanceAlongShapeInRange that #1873 already deleted, not from anything those branches add. Removing it here won't break any of them on rebase. Approving.



Fixes #1895
What it does
Deletes the unused
models.RangeSearchBufferMetersconstant and its comment frominternal/models/constants.go. No behavior or response changes.Root cause
The constant's only caller was
getDistanceAlongShapeInRangeininternal/restapi/trips_helper.go, where it widened the shape-segment search window by 50 m to tolerate GPS noise. #1873 (2f0e23a6) removed that function as dead code, which left the constant orphaned. Go doesn't report unused exported package-level constants, so nothing flagged it.Testing
mainbefore this change: n/a (dead code removal)git grep -n "RangeSearchBuffer"on this branch: no matches (code, tests or docs)go build ./...: passesgo vet ./...(compiles_test.gofiles too): passesgo test ./internal/models/...:ok maglev.onebusaway.org/internal/models 0.018sgofmt -l internal/models: no outputChecklist
Ready-for-review requirement: Every box must be checked. If any statement is not true, keep the pull request
as Draft.
mainand passes on this branch.gtfsdb/(db.go,models.go,query.sql.go) ortestdata/openapi.yml(synced from upstream).r.Context()to DB/service calls, notcontext.Background().testdata/openapi.yml, has an issue open on OneBusAway/sdk-config, or is outside the SDK and the description says why.Summary by CodeRabbit