branch: elpa/flymake-collection commit e3788b253441cf495b20d5a5cff3e099df5c90ba Author: Mohsin Kaleem <mohk...@kisara.moe> Commit: Mohsin Kaleem <mohk...@kisara.moe>
(checkers): Add follow-sources option to flymake-rest-shellcheck --- checkers/flymake-rest-shellcheck.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/checkers/flymake-rest-shellcheck.el b/checkers/flymake-rest-shellcheck.el index 3e1d014706..9cf9cbc51d 100644 --- a/checkers/flymake-rest-shellcheck.el +++ b/checkers/flymake-rest-shellcheck.el @@ -29,6 +29,13 @@ (require 'flymake-rest-define) (require 'flymake-rest-parse-enumerate)) +(defcustom flymake-rest-shellcheck-follow-sources t + "Whether to follow" + :type '(choice (const :tag "Follow source files" t) + (const :tag "Follow source files and lint them" lint) + (const :tag "Do not follow source files" nil)) + :group 'flymake-rest) + ;;;###autoload (autoload 'flymake-rest-shellcheck "flymake-rest-shellcheck") (flymake-rest-define flymake-rest-shellcheck "A shell script syntax and style checker using Shellcheck. @@ -43,7 +50,10 @@ See URL `https://github.com/koalaman/shellcheck/'." "--format" "json" ,@(when-let ((sh (bound-and-true-p sh-shell))) `("--shell" ,(symbol-name sh))) - "--external-sources" + ,@(when flymake-rest-shellcheck-follow-sources + `("--external-sources" + ,@(when (eq flymake-rest-shellcheck-follow-sources 'lint) + '("--check-sourced")))) "-") :error-parser (flymake-rest-parse-enumerate