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.
What to do
Section titled “What to do”Read the argument in the function, or drop it from every call.
Example
Section titled “Example”_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
Section titled “Turn it off”Turn it off for some files, with a reason:
gspot ignore bash/unread-arguments --paths "<glob>" --reason "<why>"