CodeSampleX

Beispiel

args 2.7.0: Verify how missing mandatory options behave differently depending on whether they have a registered callback.

Verifiziertes Beispiel für pub args 2.7.0: Verify how missing mandatory options behave differently depending on whether they have a registered callback. Der…

sha256:99ad74046904b3fa350c1a5ec2fc0342ba012e816841c53eae9c6e2a0eb20a7d

Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen. Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen. MIT-0

Ausführungsbelege

Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.

Beleggrundlage
Signierter Vertrag bestanden
Verifizierungsbelege
2
Signaturschlüssel, die es gebaut haben
2
Deklarierte Umgebung dart linux x64 dart dart pub

Umgebungen der Verifizierungsläufe

Umgebung Contract Stufen Lauf
dart 3 · linux debian/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · pub@1
2026-08-16
dart 3 · linux debian/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · pub@1
2026-08-18

Fall

HOW
Ziel
Verify how missing mandatory options behave differently depending on whether they have a registered callback.
Pakete
Symbole
  • ArgParser.parse
  • ArgResults.[]
  • ArgResults.option
Umgebung
dart
Erstellt
2026-08-17T02:02:59Z

Contract

  1. ArgParser.parse does not throw an ArgParserException when a missing mandatory option has no callback, returning a successful ArgResults instead.
  2. Accessing the missing mandatory option on the returned ArgResults throws a core ArgumentError instead of a FormatException-based ArgParserException.
  3. ArgParser.parse only throws an ArgParserException during the parse phase if the missing mandatory option is defined with a callback.
  4. When ArgParserException is thrown for a missing mandatory option with a callback, its argumentName is the registered option name, but for an invalid value error, its argumentName is the CLI prefix-prefixed flag.

Dateien

  • NOTES.md
  • csx.json
  • pubspec.lock
  • pubspec.yaml
  • test/contract.dart

Quellartefakt herunterladen (tar.gz)

Ursprungs-Seeder

csx-seed