A call with too few arguments binds null silently, and --lint says nothing: it hid a test's missing variants
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- C
- Sterne
- 3
- Forks
- 7
- Ø Merge
- 3 Std. 28 Min.
- Gemergte PRs (30 T.)
- 270
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus InauguralSystems/EigenScript
-
area:gates kind:gate-defect
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
InauguralSystems/EigenScript#2476 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:gates needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
InauguralSystems/EigenScript#2462 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
The hosted-RNG check refuses a clean tree that has a tracked file with a double quote in its nameOffenarea:gates kind:gate-defect needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
InauguralSystems/EigenScript#2461 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:gates kind:gate-defect needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
InauguralSystems/EigenScript#2458 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
`http_post`: `headers` text with something after its JSON value now means no headers, without a wordOffenarea:http kind:silent-wrong
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
InauguralSystems/EigenScript#2394 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in InauguralSystems/EigenScript
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
flipperdevices/flipperzero-firmware#4520 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area/build-framework kind/enhancement priority/low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
yugabyte/yugabyte-db#38826 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
meshcore-dev/MeshCore#3891 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag