chore(test): replace the wtindex test file writer with testtree
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Bắt đầu từ writeFiles trong internal/wtindex/prepare_test.go (khoảng dòng 22) và hàm trợ giúp testtree.Write trong internal/testtree/testtree.go, sau đó so sánh cách mỗi hàm tạo thư mục cha và ghi tệp. Thêm testtree.WriteInto(t, root, files) và để Write ủy quyền cho hàm này. Hoàn thành khi writeFiles được xóa, 10 lệnh gọi của nó trong prepare_test.go và equality_test.go dùng testtree.WriteInto, và các kiểm thử wtindex vẫn pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What kind of chore?
Test infrastructure
What needs doing?
writeFiles in internal/wtindex/prepare_test.go:22 repeats testtree.Write in internal/testtree/testtree.go. Both make the parent directories and write each file.
The copies differ in one way. writeFiles writes into a root that the caller passes, because worktreeFixture (internal/wtindex/prepare_test.go:37) creates the main checkout and the worktree itself. testtree.Write makes its own temporary directory.
Add testtree.WriteInto(t, root, files) and have Write call it. Then delete writeFiles and point its 10 call sites in internal/wtindex/prepare_test.go and internal/wtindex/equality_test.go at testtree.WriteInto.
Why now?
Two copies of the file writer can drift apart. A later fix to one copy will not reach the other. Tidiness is the trigger, so this is lower priority.
Issue #284 tracks the same kind of repeated test helper in other packages.
Does this touch anything load-bearing?
- The release pipeline (
release.yml,.goreleaser.yaml, signing) - The upgrade identity (
internal/upgrade/verify.go) - The perf baseline (
tools/bench/baseline.json) - The graph schema / meta-key layout
- None of these
Before submitting
- I searched existing issues and this is not a duplicate
🤖 Generated with Claude Code
- Ngôn ngữ chính
- Go
- Star
- 0
- Fork
- 0
- Merge trung bình
- 7 giờ 42 phút
- Pull request đã merge (30 ngày)
- 111
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của seanb4t/codegraph-go
-
chore needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
seanb4t/codegraph-go#380 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
seanb4t/codegraph-go#379 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:query chore needs-triage spec-needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
seanb4t/codegraph-go#377 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore needs-triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
seanb4t/codegraph-go#362 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:query bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
seanb4t/codegraph-go#355 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của seanb4t/codegraph-go
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
automated documentation maintenance
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 75/100
github/gh-aw-mcpg#16717 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs: Recording rules pages don't say what happens to a recorded metric when its rule is deletedĐang mởinternal
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
jesseduffield/lazygit#6229 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
prometheus/prometheus#20482 ·
Maintainer thường phản hồi trong vòng 2 ngày