pub enum IssueCode {
Show 15 variants
UndefinedCommand,
MissingRequiredArg,
UnknownFlag,
InvalidArgType,
SeqZeroIncrement,
InvalidRegex,
BreakOutsideLoop,
ReturnOutsideFunction,
PossiblyUndefinedVariable,
ForLoopScalarVar,
ScatterWithoutGather,
LastResultFieldAccess,
DiffNeedsTwoFiles,
InvalidSedExpr,
InvalidJqFilter,
}Expand description
Categorizes validation issues for filtering and tooling.
Variants§
UndefinedCommand
Command not found in registry or user tools.
MissingRequiredArg
Required parameter not provided.
UnknownFlag
Flag not defined in tool schema.
InvalidArgType
Argument type doesn’t match schema.
SeqZeroIncrement
seq increment is zero (infinite loop).
InvalidRegex
Regex pattern is invalid.
BreakOutsideLoop
break/continue outside of a loop.
ReturnOutsideFunction
return outside of a function.
PossiblyUndefinedVariable
Variable may be undefined.
ForLoopScalarVar
Bare scalar variable in for loop (no word splitting in kaish).
ScatterWithoutGather
scatter without gather — parallel results would be lost.
LastResultFieldAccess
Field access on $? (e.g. ${?.data}, ${?.ok}) was removed.
$? is the POSIX exit code; use kaish-last for structured data.
DiffNeedsTwoFiles
diff was given other than two file operands.
InvalidSedExpr
sed expression is syntactically invalid.
InvalidJqFilter
jq filter expression is syntactically invalid.
Implementations§
Source§impl IssueCode
impl IssueCode
Sourcepub fn code(&self) -> &'static str
pub fn code(&self) -> &'static str
Returns a short code string for the issue.
Code numbers are stable identifiers, not contiguous. E010 and W003/W004/W005 remain retired. E006 (InvalidSedExpr), E007 (InvalidJqFilter), and E011 (DiffNeedsTwoFiles) were wired up with real emitters in 2026-06-14.
Sourcepub fn default_severity(&self) -> Severity
pub fn default_severity(&self) -> Severity
Default severity for this issue code.