#[non_exhaustive]pub enum DiagnosticCode {
Show 16 variants
InvalidKey,
UnterminatedQuote,
TrailingText,
UnknownEscape,
DuplicateKey,
BareKey,
NonPosixKey,
TightHash,
Backtick,
ByteOrderMark,
LoneCarriageReturn,
ForbiddenBareKey,
ForbiddenByteOrderMark,
InvalidEscape,
IgnoredStatement,
LineTooLong,
}Expand description
Stable diagnostic identities; messages are descriptive, not API identifiers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidKey
A key is empty or contains a character outside the selected key alphabet.
UnterminatedQuote
A quoted value has no matching delimiter before EOF.
TrailingText
Non-comment text follows a closing quote.
UnknownEscape
An unknown double-quoted escape is retained literally.
DuplicateKey
An earlier assignment has the same key.
BareKey
A declaration has no equals sign or value.
NonPosixKey
A key is not a POSIX shell variable name.
TightHash
A hash attached to an unquoted value is literal, not a comment.
Backtick
Backticks are literal, not a Portable quoting style.
ByteOrderMark
A UTF-8 byte-order mark precedes the source body.
LoneCarriageReturn
A lone carriage return is retained as a source line ending.
ForbiddenBareKey
The selected policy forbids key-only declarations.
ForbiddenByteOrderMark
The selected policy forbids a leading byte-order mark.
InvalidEscape
The selected policy rejects an unrecognized escape.
IgnoredStatement
A statement is retained but ignored by the selected dialect.
LineTooLong
A source line exceeds the selected scanner’s byte limit.