Skip to content

bash/unread-arguments

Finds shell functions called with arguments they never read.

Part of the bash configuration, at the recommended level. It runs at the commit stage, once per scope. gspot runs this check itself.

An unread argument misleads the caller, who expects it to change the result.

Read the argument in the function, or drop it from every call.

_deaf one two reports dead parameters when _deaf never reads its arguments. Drop them from the call, or use them in the function.

Turn it off for some files, with a reason:

gspot ignore bash/unread-arguments --paths "<glob>" --reason "<why>"