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
| Code | Severity | Summary |
|---|---|---|
| AG001 | Error | Args entry missing description |
| AG002 | Error | Usage entry missing description |
| AG003 | Error | Invalid field specification |
| AG004 | Warning | Missing local variable declaration |
| AG005 | Error | args declared but :args never called |
| AG006 | Error | usage declared but :usage never called |
| AG007 | Warning | Usage target function not found |
| AG008 | Warning | Duplicate flag name |
| AG009 | Warning | Duplicate short alias |
| AG010 | Warning | Command resolves to bare function |
| AG012 | Hint | Local variable shadows parent args field |
| AG013 | Warning | Import could not be resolved |
| AG014 | Warning | Inherited field missing default pattern |
| AG015 | Warning | Source 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?