A call with too few arguments binds null silently, and --lint says nothing: it hid a test's missing variants
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- C
- Stelle
- 3
- Fork
- 7
- Merge medio
- 3h 28m
- PR unite (30g)
- 270
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di InauguralSystems/EigenScript
-
area:gates kind:gate-defect
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
InauguralSystems/EigenScript#2476 ·
I maintainer di solito rispondono entro 1 giorno
-
area:gates needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
InauguralSystems/EigenScript#2462 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
The hosted-RNG check refuses a clean tree that has a tracked file with a double quote in its nameApertaarea:gates kind:gate-defect needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
InauguralSystems/EigenScript#2461 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area:gates kind:gate-defect needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
InauguralSystems/EigenScript#2458 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
`http_post`: `headers` text with something after its JSON value now means no headers, without a wordApertaarea:http kind:silent-wrong
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
InauguralSystems/EigenScript#2394 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di InauguralSystems/EigenScript
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
flipperdevices/flipperzero-firmware#4520 ·
I maintainer di solito rispondono entro 1 giorno
-
area/build-framework kind/enhancement priority/low
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
yugabyte/yugabyte-db#38826 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
meshcore-dev/MeshCore#3891 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug grammar sev-3
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
BUG/MEDIUM: regex: worker SIGSEGV when a regex is applied to an empty body on libc-regex buildsApertastatus: needs-triage type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100