I use GNU Emacs 26.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-06-09, and Shellcheck 0.3.7 als linter for bash scripts (https://www.shellcheck.net).

When I open a bash script, I get errors from Flycheck, which makes it unusable for me. Verbatim from message buffer:

Try installing a more recent version of sh-shellcheck, and please open a bug report if the issue persists in the latest release. Thanks! Suspicious state from syntax checker sh-shellcheck: Flycheck checker sh-shellcheck returned non-zero exit code 3, but its output contained no errors: unrecognized option `--external-sources'

Usage: shellcheck [OPTIONS...] FILES... -e CODE1,CODE2.. --exclude=CODE1,CODE2.. exclude types of warnings -f FORMAT --format=FORMAT output format -s SHELLNAME --shell=SHELLNAME Specify dialect (bash,sh,ksh) -V --version Print version information

It seems nobody is experiencing the same issue. I tested it with bare Emacs, and standard Shellcheck. How could I debug this further?

1 Answer 1


apt installs an old version of flycheck, https://github.com/koalaman/shellcheck/issues/704 that does not support --external-sources, this particular commit has been merged at flycheck recently https://github.com/flycheck/flycheck/pull/1256/files/7b35a1b17e415ecc8f9fc04b3a043a3afb40599c and make use of such feature. The solution is simple, just opt-out of it. Just like suggested here

  (setq flycheck-shellcheck-follow-sources nil)
  • Thank you for your reply, CESCO. However, it disables Flycheck for bash scripts I suppose?
    – ReneFroger
    Aug 1, 2017 at 18:18
  • No it does not. I just disables this specific feature
    – CESCO
    Aug 9, 2017 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.