external-sourcescan only be enabled in .shellcheckrc, not in individual files.
# shellcheck external-sources=true source /dev/zero
Due to its origins as an online tool, ShellCheck will by default run in a sandbox where it only reads the files explicitly named on the command line.
external-sources directive allows disabling this, but must be specified in
.shellcheckrc. This is because the sandbox would be useless if the sandboxed script can disable it for itself.
ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.