This script is a wrapper for ShellCheck to work around its lack of support for multi-file scripts.
It works by:
- reading the supplied shell script (and, recursively, the shell scripts it sources);
- placing the result into a single temporary file;
- invoking
shellcheckon that file; - reading
shellcheck's output; - substituting the file names and line numbers in
shellcheck's output with the real file names and line numbers; - printing the thus edited results.
$ multishellcheck MAIN-FILE-NAME [SHELLCHECK-OPTIONS...]
If you wish to get colour output, you can enable it with the -Calways ShellCheck option.
multishellcheck is used as part of automatic CI for aconfmgr, a configuration manager for Arch Linux written 100% in Bash.