Question

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 results 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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top