As of 40469d5
, Flycheck includes the warning code of ShellCheck in the messages, and provides a new option flycheck-shellcheck-excluded-warnings
to exclude warnings from ShellCheck reports.
To suppress a ShellCheck warning for Flycheck, use the error list at C-c ! l
to find out the corresponding error code (in square brackets at the end of the message), and add it to flycheck-shellcheck-excluded-warnings
.
To globally suppress SC2029
, add the following to your init.el
:
(setq-default flycheck-shellcheck-excluded-warnings '("SC2029"))
To suppress this type just for a specific file, type M-x add-file-local-variable RET flycheck-shellcheck-excluded-warnings RET ("SC2029")
.
Note that these suppressions only work for Flycheck. The message still appears if you run ShellCheck from the terminal, or as part of your CI or testing system. To suppress a message for all instances of ShellCheck, as in this answerthis answer.