AG007: Usage Target Function Not Found
| Property | Value |
|---|---|
| Code | AG007 |
| Severity | Warning |
| Since | v0.1.0 |
Description
A usage=() entry references a subcommand whose target function cannot be
found in the current file or resolved imports. The linter searches these
namespaces in order:
<caller>::<cmd>-- full caller prefix (e.g.main::deploy)<last_segment>::<cmd>-- last::segment of callerargsh::<cmd>-- framework namespace<cmd>-- bare function name
If none resolve, this diagnostic fires.
Example
This triggers AG007:
How to Fix
Define the target function or fix the command name:
If the function is in another file, make sure it is imported:
How to Suppress
Or file-wide:
Was this section helpful?