A call with too few arguments binds null silently, and --lint says nothing: it hid a test's missing variants
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
Start with docs/SPEC.md and docs/DIAGNOSTICS.md, then trace how --lint handles W022 and how calls check argument counts. The issue gives two under-arity calls as required tests and a default-argument call as a clean control. Done means the runtime behavior decision and its reason are recorded, lint warns for statically known same-file calls missing required arguments, and the spec reflects the decision.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
docs/SPEC.md says of a call that passes fewer arguments than the callee has parameters: "Under-arity is unchanged and deliberately silent for now: missing parameters bind null (or fire their default), no error." Over-arity raises since #974, and lint W022 catches it in the same file. Nothing catches the other side, in the strict default or under --lint:
define two(a, b) as:
return [a, b]
print of (two of ([1, 2])) # [[1, 2], null]
print of (two of 7) # [7, null]
--lint reports nothing for either call.
What it cost
In the review of #2418 a test's helper took (circle, variant) and every call site passed one parenthesised list, variant_2298 of ([...]). variant was null in all 4,176 calls, the swapped and mirrored variants the test claimed to deal were never dealt, and the test stayed green over a fault those variants would have shown. A blind reviewer found it by printing the parameter. The writer of that test was a model; the parenthesised-list form is exactly what W022's own message recommends for passing a list whole, so the two forms are one keystroke apart.
Done when
- Decided, with the reason written here: under-arity with no default raises (as over-arity does), or stays silent at run time.
- Whichever is decided,
--lintwarns for a same-file call to a statically known callee that passes fewer arguments than the callee has parameters without defaults, with a row indocs/DIAGNOSTICS.md; the two calls above are its test, and a call that relies on a default is its clean control. -
docs/SPEC.md's "for now" is replaced by the decision.
— Claude DevBox
- Ngôn ngữ chính
- C
- Star
- 3
- Fork
- 7
- Merge trung bình
- 3 giờ 28 phút
- Pull request đã merge (30 ngày)
- 270
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc 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 InauguralSystems/EigenScript
-
area:gates kind:gate-defect
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
InauguralSystems/EigenScript#2476 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:gates needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
InauguralSystems/EigenScript#2462 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The hosted-RNG check refuses a clean tree that has a tracked file with a double quote in its nameĐang mởarea:gates kind:gate-defect needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
InauguralSystems/EigenScript#2461 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:gates kind:gate-defect needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
InauguralSystems/EigenScript#2458 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`http_post`: `headers` text with something after its JSON value now means no headers, without a wordĐang mởarea:http kind:silent-wrong
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
InauguralSystems/EigenScript#2394 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của InauguralSystems/EigenScript
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
flipperdevices/flipperzero-firmware#4520 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/build-framework kind/enhancement priority/low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
yugabyte/yugabyte-db#38826 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
meshcore-dev/MeshCore#3891 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug grammar sev-3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
BUG/MEDIUM: regex: worker SIGSEGV when a regex is applied to an empty body on libc-regex buildsĐang mởstatus: needs-triage type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100