Description
What is the problem this feature will solve?
There are quite a few shellcheck errors that I want shellcheck to catch but I don't want to correct them in all scenarios. In order to tell shellcheck to ignore an error, you need to add a comment that looks like this: # shellcheck disable=SC2048
. The only problem is this number is removed by bash ls, so I have no way of knowing what shellcheck code to disable.
What is the feature you are proposing to solve the problem?
Please don't remove the SC####
codes - I want to know them so I can disable warnings I don't want to fix.
example of a warning I don't want to fix:
What alternatives have you considered?
The alternative is you run shellcheck on its own to see what the code is, then copy paste the code into the shellcheck disable
comment, but having to run shellcheck externally defeats the purpose of shellcheck integration.
Another thing is you can have a shellcheck rc file that provides a list of codes to always disable, but I don't want to have codes always disabled. I want shellcheck to keep me from messing up but I also want to be able to turn off errors so I don't have superfluous errors in my code. Not to mention that building such a file requires knowing the codes to begin with, which brings me back to my first point.