New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: disable directives in fles #2951
Comments
I would like to share a use-case of why I see this feature being useful. Imagine a script coder within an organization/company uses inline directives to ignore suggestions for convenience, which would lead to violating a style-guide or some compliance-motivated rules for writing scripts. |
For new checks and feature suggestions
-o all
, and that doesn't really seem to do what I'm looking for.Here's a snippet or screenshot that shows the problem:
shellcheck --help
Here's what shellcheck currently says:
No option to ignore directives in files.
Here's what I wanted or expected to see:
There should be an option to ignore directives in files, or at the very least, specify directives that should not be allowed in files.
The rationale here is that KDE recently had a huge problem with a global theme that nuked a user's home directory due to faulty code. KDE could possibly use Shellcheck for automated testing of such content, and that would be fine for faulty code, but then they'd still be vulnerable to people using directives irresponsibly, like if a scripter thinks that they know what they're doing when they really, really don't. This wouldn't protect against malicious actors, but I'm not sure there's really a good way to do that.
The text was updated successfully, but these errors were encountered: