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.
Trait Implementations§
impl Copy for IssueCode
impl Eq for IssueCode
impl StructuralPartialEq for IssueCode
Auto Trait Implementations§
impl Freeze for IssueCode
impl RefUnwindSafe for IssueCode
impl Send for IssueCode
impl Sync for IssueCode
impl Unpin for IssueCode
impl UnsafeUnpin for IssueCode
impl UnwindSafe for IssueCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.