Conversation
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #5 +/- ##
=====================================
Coverage 88.4% 88.4%
=====================================
Files 10 10
Lines 829 840 +11
=====================================
+ Hits 733 743 +10
- Misses 96 97 +1
🚀 New features to boost your workflow:
|
Remove stale lint exclusions for files outside this module and trim redundant test scaffolding so future changes fail with clearer evidence. Keep production cleanup limited to path helper internals already covered by the existing URI path tests.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request simplifies linter configurations in .golangci.yaml, refactors allocation tests in fspath_test.go to use a cleaner struct-driven approach, and optimizes path operations in posixpath.go by utilizing strings.SplitSeq and strings.Builder. Additionally, test helpers in vector_test.go are updated to use standard library functions and improve error reporting. Feedback is provided on posixpath.go to further optimize posixJoin by bypassing strings.Builder for single non-empty paths and pre-allocating the builder's capacity to minimize allocations.
Handle zero and single non-empty joins before constructing a builder, and grow the builder exactly for multi-part joins. This addresses the Gemini review thread on PR #5 without changing URI path semantics. Co-authored-by: Codex <noreply@openai.com>
Handle zero and single non-empty joins before constructing a builder, and grow the builder exactly for multi-part joins. This addresses the Gemini review thread on PR #5 without changing URI path semantics.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request cleans up and optimizes several components. In .golangci.yaml, unused linter overrides and comments are removed. In posixpath.go, path normalization and joining are optimized to reduce allocations by using strings.SplitSeq and strings.Builder with pre-allocated capacity. Test files are also refactored: fspath_test.go simplifies allocation gate testing with a table-driven approach, change_test.go removes a redundant test case, and vector_test.go leverages standard library functions (slices.Contains) and improves error handling in vector tests. There are no review comments, so no further feedback is provided.
Summary
This PR keeps the URI package maintenance surface focused after the strict
anti-slop cleanup pass.
It removes stale lint configuration copied from unrelated code paths, trims
redundant test scaffolding, and makes vector fixture failures report clearer
evidence. The only production-code change is a small internal POSIX path helper
modernization using Go 1.26-compatible standard-library APIs.
Changes
.golangci.yamlexclusions for files that are not part ofthis module.
Withtest case that covered the same authority-clearingbehavior twice.
case names.
slices.Containsdirectly in vector metadata checks.strings.SplitSeqandstrings.Builderwhile preserving the existing URI path behavior.Impact
21 insertions, 83 deletions.
Validation
go test -count=1 ./...make testgopls check $(git ls-files '*.go' ':!:vendor/**')go vet ./...tools/bin/golangci-lint run ./...git diff --checkgovulncheck ./...