def text
shake@0.7.0.0 · src/check.bend:157
import shake@0.7.0.0/src/check.bend as Check
import Base
157
158def text(err: SpecErr) -> String:
159 match err:
160 case RestNotLast{path, name}:
161 at(path) ++ "rest positional '" ++ name ++ "' is not the last positional"
162 case SameName{path, name}:
163 at(path) ++ "two arguments are named '" ++ name ++ "'"
164 case SameShort{path, short}:
165 at(path) ++ "two arguments are spelled '-" ++ short ++ "'"
166 case SameLong{path, long}:
167 at(path) ++ "two arguments are spelled '--" ++ long ++ "'"
168 case SameSub{path, name}:
169 at(path) ++ "two subcommands are named '" ++ name ++ "'"
170 case HelpSub{path}:
171 at(path) ++ "a subcommand is named 'help', which `parse` keeps for help"
172 case DefaultNotChoice{path, name, value}:
173 at(path) ++ "the default '" ++ value ++ "' of '" ++ name ++ "' is not one of its choices"
174 case RequiredAfterOptional{path, name}:
175 at(path) ++ "required positional '" ++ name ++ "' follows an optional one"