Bug #19402 [Com]: syntax error when executing phpcs

From: Date: Fri, 04 May 2012 01:48:34 +0000
Subject: Bug #19402 [Com]: syntax error when executing phpcs
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-8602@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=19402&edit=1 ID: 19402 Comment by: awtrost Reported By: AWTrost at gmail dot com Summary: syntax error when executing phpcs Status: Feedback Type: Bug Package: PHP_CodeSniffer Operating System: Windows 7 Package Version: 1.3.3 PHP Version: 5.3.9 Assigned To: squiz New Comment: I have the same issue. It happens when I run phpcs on any php file, or by just running it by itself. I just ran phpcs -h and it did it again. The odd thing is that if I just press ok on the alert box, phpcs continues on like there wasn't an issue (reports errors for the file given, prints out the phpcs help info etc. ). Not sure if this printout is what you were asking for, but here is the print out when i run phpcs -h: Alert box that contains "syntax error, unexpected '(' in Unknown on line 9" Usage: phpcs [-nwlsapvi] [-d key[=value]] [--report=<report>] [--report-file=<reportfile>] [--report-<report>=<reportf ile>] ... [--report-width=<reportWidth>] [--generator=<generator>] [--tab-width=<tabWi dth>] [--severity=<severity>] [--error-severity=<severity>] [--warning-severity=<s everity>] [--config-set key value] [--config-delete key] [--config-show] [--standard=<standard>] [--sniffs=<sniffs>] [--encoding=<encoding>] [--extensions=<extensions>] [--ignore=<patterns>] <file> ... -n Do not print warnings (shortcut for --warning-severity=0) -w Print both warnings and errors (on by default) -l Local directory only, no recursion -s Show sniff codes in all reports -a Run interactively -p Show progress of the run -v[v][v] Print verbose output -i Show a list of installed coding standards -d Set the [key] php.ini value to [value] or [true] if value is omitted --help Print this help message --version Print version information <file> One or more files and/or directories to check <extensions> A comma separated list of file extensions to check (only valid if checking a directory) <patterns> A comma separated list of patterns to ignore files and dir ectories <encoding> The encoding of the files being checked (default is iso-88 59-1) <sniffs> A comma separated list of sniff codes to limit the check t o (all sniffs must be part of the specified standard) <severity> The minimum severity required to display an error or warni ng <standard> The name or path of the coding standard to use <tabWidth> The number of spaces each tab represents <generator> The name of a doc generator to use (forces doc generation instead of checking) <report> Print either the "full", "xml", "checkstyle", "csv", "emac s" "source", "summary", "svnblame", "gitblame" or "hgblame" r eport (the "full" report is printed by default) <reportfile> Write the report to the specified file path <reportWidth> How many columns wide screen reports should be printed Previous Comments: ------------------------------------------------------------------------ [2012-04-27 22:41:21] squiz <div id="changeset"> <span class="removed">-Status: Open</span> <span class="added">+Status: Feedback</span> <span class="removed">-Assigned To:</span> <span class="added">+Assigned To: squiz</span> </div>What code are you running PHPCS on? Running the phpcs command by itself is just going to wait for user input, so the whole command you used or the output from "phpcs -h" would be helpful please. ------------------------------------------------------------------------ [2012-04-27 21:26:55] brandonmull Description: ------------ syntax error in unknown script interrupts code sniffer Recently installed PHP_CodeSniffer. No errors during install. Did not install optional dependency "phpunit/PHP_Timer". Tried running code sniffer from command line and got alert box warning of syntax error. Test script: --------------- From command line > phpcs Actual result: -------------- alert box ---------------------------- title - PHP Error message - syntax error, unexpected '(' in Unknown on line 9 ---------------------------- ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=19402&edit=1

« previous php.pear.bugs (#8602) next »