Skip to main content
Skip to main content

Diagnostic Codes

argsh-lint reports diagnostics using stable AG#### codes, modeled after shellcheck's SC#### identifiers. Each code targets a specific class of mistake in argsh scripts.

Error Severity

CodeSeveritySummary
AG001ErrorArgs entry missing description
AG002ErrorUsage entry missing description
AG003ErrorInvalid field specification
AG004WarningMissing local variable declaration
AG005Errorargs declared but :args never called
AG006Errorusage declared but :usage never called
AG007WarningUsage target function not found
AG008WarningDuplicate flag name
AG009WarningDuplicate short alias
AG010WarningCommand resolves to bare function
AG012HintLocal variable shadows parent args field
AG013WarningImport could not be resolved
AG014WarningInherited field missing default pattern
AG015WarningSource directive path not found
Note

AG011 was removed. Trailing | in a field spec is valid syntax that marks a long-only flag (no short alias).

Suppressing Diagnostics

All diagnostic codes can be suppressed using comment directives, following the same style as shellcheck:

# Suppress specific codes on the next line
# argsh disable=AG001,AG004

# Suppress specific codes for the entire file
# argsh disable-file=AG007

# Suppress all argsh diagnostics for the entire file
# argsh disable-file

# Inline suppression (on the same line as the code)
local -a args=( ... ) # argsh disable=AG004

The hyphenated form # argsh-ignore=AG001 is also supported.

See the Lint guide for the full command-line interface and editor integration.

Was this section helpful?