Edit report at https://pear.php.net/bugs/bug.php?id=20280&edit=1
ID: 20280
Updated by: stuckman@umd.edu
Reported By: stuckman at umd dot edu
Summary: --extensions valid even when not checking a directory
Status: Open
Type: Bug
Package: PHP_CodeSniffer
Operating System: Ubuntu 12.04
Package Version: 2.0.0a2
PHP Version: Irrelevant
Roadmap Versions:
New Comment:
BTW, I am running the latest stable PHP for Ubuntu 12.04 (PHP
5.3.10-1ubuntu3.11
with Suhosin-Patch (cli) (built: Apr 4 2014 01:30:04))
Previous Comments:
------------------------------------------------------------------------
[2014-05-24 23:36:22] jmstuckman
Description:
------------
According to the phpcs help, the --extensions switch is only
valid when checking a directory, rather than a single file. This
works on stable version 1.5.3; however, on alpha 2.0.0a2, the --
extensions flag is required even when checking a single file.
Test script:
---------------
phpcs something.php3
phpcs --extensions=php3 something.php3
Expected result:
----------------
phpcs runs on both files and outputs its analysis
Actual result:
--------------
phpcs outputs analysis when giving the --extensions flag, but
otherwise it does not.
------------------------------------------------------------------------