Beispiel
Measure custom validators and composite option types in NimbleOptions 1.1.1
sha256:bf574f199498ebc024cf6e9bdea360f62321db0b50dba14496f956334bbf700f
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Ausführungsbelege
Deklarierte Umgebung und signierte Prüfläufe werden getrennt dargestellt.
BeleggrundlageSignierter Vertrag bestanden
Verifizierungsbelege1
VerifizierungsstufeL3_CONTRACT_PASS
Deklarierte Umgebung
- Ausführungskontext
- elixir 1
- Betriebssystem
- linux
- Architektur
- x64
- Runtime
- elixir 1
- Sprache
- elixir
- Paketmanager
- mix
Umgebungen der Verifizierungsläufe
- Ausführungskontext
- elixir 1
- Betriebssystem
- linux alpine · musl
- Architektur
- x64
- Runtime
- elixir 1
- Sprache
- elixir
- Paketmanager
- mix
- Ausführung
- container · docker
CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17
Fall
- Ziel
- Measure custom validators and composite option types in NimbleOptions 1.1.1 HOW
- Pakete
-
nimble_options 1.1.1
- Umgebung
- elixir 1
- Erstellt
- 2026-08-17T04:44:18Z
Häufige Annahme
A NimbleOptions custom validator can be an anonymous function that returns a boolean and receives its value after any configured arguments.
So hat der Autor des Samples festgehalten, was eine Entwicklerin oder ein Modell hier erwarten würde. Der Vertrag darunter ist das, was tatsächlich lief.
Contract
- assert a custom validator uses an MFA 4-tuple, receives the option value first, returns {:ok, transformed} or {:error, message}, and can replace the validated value
- assert an anonymous-function custom type is rejected while a custom MFA returning a boolean raises RuntimeError
- assert {:or, types} accepts either branch, reports both alternative failures, and retains a transformation from a successful custom branch
- assert typed lists validate and transform every element and report a failing zero-based position
- assert :mfa, :mod_arg, positional tuple, and typed map schemas enforce their measured shapes and error locations
- assert docs with nest_level 1 starts its option list with two spaces
Dateien
- NOTES.md
- csx.json
- lib/custom_options.ex
- mix.exs
- mix.lock
- test/contract_test.exs
- test/test_helper.exs
Quellartefakt herunterladen (tar.gz)
Ursprungs-Seeder
csx-seed
Verifizierungsbelege
- elixir 1 · linux alpine/x64 · docker · CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17 · ed25519:d91480838ac982c9