Feature request: Checking shell commands in non-shell files
For new checks and feature suggestions
- [x] https://www.shellcheck.net/ (i.e. the latest commit) currently gives no useful warnings about this
- [x] I searched through https://github.com/koalaman/shellcheck/issues and didn't find anything related NOTE: #1306 is remotely related but different enough that I feel this warrants its own issue
Here's what I wanted or expected to see:
As mentioned in https://github.com/koalaman/shellcheck/issues/1306#issuecomment-604880746, a lot of automation uses shell script commands but the files where the commands are kept are not proper shell scripts themselves.
Immediately jumping to mind: Puppet/Chef/Ansible/SaltStack/CFEngine manifests, Kubernetes ConfigMaps and Deployment manifests, Gitlab CI Pipeline manifests, GitHub release pipelines, Jenkins Pipelines and even some VS Code related files may have shell commands in them.
In many cases it is difficult or impossible to pre-process the files mentioned to make them into proper scripts for ShellCheck, so it would be really great if shellcheck can parse the files itself.
As a side note, I wonder if you would consider creating a plugin system to allow for anyone to extend the capabilities of ShellCheck for requests such as this? I could open a separate request if that would be considered.