如何调用 shell 脚本语法检查器(by/with 语法和病原体)?

How is a shellscript syntax checker invoked (by/with syntastic and pathogen)?

当我处理 bash/sh 脚本时,病原体会启动并正确加载 ~/.vim/bundle/syntastic/syntax_checkers/sh/ 中的所有内容。我在命令行模式下使用 :scriptnames 检查。包括shellcheck.vimcheckbashism.vimbashate.vim

正确检测到启动 vim 会话 filetype 并加载相应的捆绑语法检查脚本。

但是 syntastic 如何调用 /usr/bin/shellcheckbashatecheckbashism?在 ~/.vimrc.

中没有什么是显而易见的

能否同时调用多个语法检查器?例如。 shellcheckbashate 可以一起工作吗?谢谢。

病原体在您的设置中的唯一作用是在 Vim 启动时将每个插件的路径和子路径附加到 'runtimepath' 选项。不多也不少。

至于 Syntastic,the default checkers for shell scripts are sh and shellcheck。阅读 :help syntastic-checker-options 了解如何定义您自己的跳棋列表。

来自 romainl 仅链接到 (the relevant parts of links should be quoted when answering) 的内容:

You can tell syntastic which checkers to run for a given filetype by setting a variable 'g:syntastic__checkers' to a list of checkers, e.g.

let g:syntastic_php_checkers = ["php", "phpcs", "phpmd"]

关于调用的问题:根据the FAQ, the "command line is constructed using an internal function named makeprgBuild(), which provides a number of options that allow you to customise every part of the command that gets run. You can set these options using global variables". (See this answer。)