Skip to main content
Skip to main content

AG001: Args Entry Missing Description

PropertyValue
CodeAG001
SeverityError
Sincev0.1.0

Description

Every entry in the args=() array must have a description string following the field spec. The description is used for --help output and documentation generation. An entry with a non-empty spec but no description is an error.

Example

This triggers AG001:

my_func() {
local name
local -a args=(
'name|n' # missing description
)
:args "My function" "${@}"
}

How to Fix

Add a description string after the field spec:

my_func() {
local name
local -a args=(
'name|n' "The name to greet"
)
:args "My function" "${@}"
}

How to Suppress

# argsh disable=AG001
'name|n'

Or file-wide:

# argsh disable-file=AG001
Was this section helpful?