开发者

In PHPUnderControl, can I configure PHP_CodeSniffer to ignore specific directories?

I've recently been trying to set up PHPUnderControl, a Continuous Integration server based on CruisControl. Part of the checks I'd like to run is the PHP CodeSniffer (PHPCS) to detect "code smell". However, letting this run on my codebase re开发者_如何转开发sults in an extreme amount of problems being detected. Most of these are found in libraries that I've included in my SVN repository through an svn:externals directive, and hence aren't under my control.

Is it possible to tell PHP_CodeSniffer to ignore part of my SVN repository, while still validating other parts?


Found the solution - one can add the --ignore switch to the set of arguments passed into phpcs.

[--ignore=<patterns>]

Use

$ phpcs --help

to displays all information about commandline usage.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜