10

我想为phpcs.

我可以通过以下方式添加一个:

phpcs --config-set installed_paths the/dir/to/standard

我尝试通过使用添加多个,:但它不起作用,并且手册页不存在,帮助也没有那么有用。

4

2 回答 2

24

使用逗号分隔的列表,路径之间没有空格:

phpcs --config-set installed_paths first/path/,second/path/,yet/another/path/
于 2015-06-19T08:51:22.157 回答
2

我对无法设置多条路径有同样的挫败感。我使用 bash 脚本将当前路径附加到 installed_pa​​ths:

phpcs_ipath=$(phpcs --config-show installed_paths); oldpath=${phpcs_ipath##*:}; phpcs --config-set installed_paths ${oldpath},$(pwd)

cd进入包含我的新标准的目录,然后运行这个单行。它抓取当前路径并将当前路径附加到它们。不完美,但它是添加路径的快速方法。

于 2016-01-30T05:54:38.287 回答