[Feature] Pass path to shellcheckrc from command line
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
Description
At the moment there doesn't seem to be a way to tell shellcheck to read a specific configuration file instead of looking for the global one.
For example I've got a lint script on my dotfiles and I'd like to setup a github action that uses my shellcheckrc file at core/scrc, how would you do this?
Version Info
ShellCheck - shell script analysis tool
version: 0.7.1
license: GNU General Public License, version 3
website: https://www.shellcheck.net
That would make sense. ShellCheck does already look at the script's closest parent directory with a .shellcheckrc, but that doesn't seem to help in your case.
Hello
Same need for me: I've a set of hooks that will verify the quality of my files before pushing them to the remote server. In my particular use case, I need to be able to specify where the .shellcheckrc should be retrieved like, f.i. shellcheck --config=.config/.shellcheckrc (I'm putting all my configurations files there).
The parameter can be, of course whatever you wish, most of static analysis tools used --config.
Thanks!
I'd very much like this option too (for CI purposes). I hope it's not too greedy to ask to have this option included in the next release so that it could become part of the next Debian Stable (Bookworm) release.
Cheers! And thank you for this wonderful tool :-)
Just adding my name to the list for this feature. It would be particularly useful when Shellcheck is called from Super-Linter.