Search code examples
phpphpcodesniffer

phpcs keeps scanning the whole project and not the specified directory


I am trying to run PHP code sniffer on a specific directory, but PHP code sniffer is ignoring the <files> flag and scan the whole project.

Here is the command I am running: ./vendor/bin/phpcs -p . --extensions=php docs/

I am using the current version of PHP sniffer (3.4.0) and docs/ is a real directory.


Solution

  • Use:

    ./vendor/bin/phpcs -p --extensions=php docs/