Inflections are generated in one direction, so an inflected file name is never carried by its stem
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Bắt đầu với namespace.Contains và logic tạo dạng biến cách, sau đó tái hiện hành vi bằng cách sử dụng internal/ssa/tracing.go và các ví dụ tracing/tracer trong issue. So sánh vocabulary workaround hiện có với hành vi được đề xuất và xác định cách xử lý các dạng động từ tương đương. Hoàn tất khi cùng một họ động từ được xử lý nhất quán mà không khiến các tên không liên quan như story khớp với store.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Inflected forms are generated from the namespace, and only ever longer ones. A namespace that is itself an inflected form is never carried by its own stem, so the verdict depends on which form the file name happens to use.
store.go storingThing carried
storing.go storeOther not carried
trace.go tracingZ carried
trace.go tracerW carried
tracing.go traceX not carried
tracing.go tracerY not carried
Every pair above is the same English verb. The rule separates them on nothing an author would recognise as a rule.
Where it came from
namespace.Contains allows the namespace anywhere in the name, with a free right edge. That covers a name longer than the namespace: store is a prefix of storing, so storingThing carries it without any generation at all.
Generation exists for the two inflections that change the namespace's own spelling, store to storing and apply to applies. It is built from the namespace side on purpose, so that only constructed forms are accepted and story never carries store.
That decision is still right. The gap is that generation only ever lengthens. Nothing produces trace from tracing, and the free right edge cannot help, since the namespace is the longer string.
This is real, not hypothetical
zerologlintctx has internal/ssa/tracing.go, whose declarations are tracerType, tracerEvent, traceValue, traceCommon, tracePhi. Under qualify: ondemand the file is asked for tracingTracerType and tracingTraceValue, which stutter. Renaming the file to tracer.go silences five of them and leaves the trace* ones, so the file name decides how much stuttering is demanded.
Options
Generate the stem as well. Reversing the e-drop turns tracing into trace, and that is the answer here. It is also how ring becomes r and string becomes str, so it needs a guard beyond stripping ing, and any guard is a rule about English rather than about Go.
Leave it to rules.naming.vocabulary. One line covers the case, and the free right edge makes it reach the whole family:
rules:
naming:
vocabulary:
tracing: [trace]
This works today. It asks the author to notice a distinction that has no reason behind it, which is the part worth fixing.
Report it. A namespace the generator can recognise as an inflected form could carry a note in the diagnostic, pointing at the vocabulary key rather than at a rename that stutters.
Note
The rule is off by default, so nothing is broken for a project that has not opted in. What the vocabulary covers, it covers well. The asymmetry is the defect: two files spelled by the same verb are treated differently, and the author has no way to predict which one is which.
- Ngôn ngữ chính
- Go
- Star
- 18
- Fork
- 0
- Merge trung bình
- 57 phút
- Pull request đã merge (30 ngày)
- 92
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 tương tự
-
[Docs] - Document minimum Terraform/OpenTofu version (>= 1.11) required by write-only argumentsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
MagaluCloud/terraform-provider-mgc#323 ·
Maintainer thường phản hồi trong vòng 11 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
rossoctl/context-guru#366 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
stage-fail
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
siyuan-note/bazaar#2293 ·
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 84/100
piraeusdatastore/piraeus-operator#1070 ·
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 68/100
Maintainer thường phản hồi trong vòng 1 ngày