It should be possible to detect and report when a disable directive is doing nothing. There are at least two ways to approach this:
-
When a shellcheck disable directive is present, but the disabled check isn't raised by the following line (or in the file when the directive is at the top), then emit a warning something like:
"Line nn: 'SCnnnn' disabled but not raised. This shellcheck directive should be removed."
-
Provide a shellcheck option to ignore or validate disable directives.
It should be possible to detect and report when a disable directive is doing nothing. There are at least two ways to approach this:
When a shellcheck disable directive is present, but the disabled check isn't raised by the following line (or in the file when the directive is at the top), then emit a warning something like:
"Line nn: 'SCnnnn' disabled but not raised. This shellcheck directive should be removed."
Provide a shellcheck option to ignore or validate disable directives.