php - Problem with PHP_CodeSniffer and SVN pre-commit hook -


i've downloaded latest version of codesniffer (1.3.rc0). prefer version , not stable 1 (1.2.2) because want "severity" feature.

i've modified existing drupal standard package compatible version of codesniffer , stablish own severity policy. when run phpcs command-line, i've no problems @ all. sniffs code correctly, filters severity , works fine.

the problem comes when try automate sniffs subversion pre-commit hook. seems phpcs-svn-pre-commit script coming release not working @ all.

i've followed guide in http://pear.php.net/manual/en/package.php.php-codesniffer.svn-pre-commit.php step-by-step, when commit file coding standard errors (detected command-line execution of phpcs , drupal standard package), subversion lets file pass , commits changes.

has been in same problem?

thanks in advance.

edited: execution examples.

$ phpcs --standard=drupal --severity=4 ak_gourmet.module  php deprecated:  comments starting '#' deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in unknown on line 0 php warning:  php startup: unable load dynamic library '/usr/lib/php5/20090626/icephp.so' - /usr/lib/php5/20090626/icephp.so: cannot open shared object file: no such     file or directory in unknown on line 0 file: ...ce/trunk/httpdocs/sites/all/modules/custom/ak_gourmet/ak_gourmet.module -------------------------------------------------------------------------------- found 21 error(s) affecting 27 line(s) --------------------------------------------------------------------------------   17 | error   | concat operator must surrounded spaces. found "...      |         | '<p>'. "; expected "... . "   17 | error   | concat operator must surrounded spaces. found "...      |         | .'</p>';..."; expected "... .;..."   40 | warning | comma should follow last multiline array item. found:      |         | menu_normal_item   53 | warning | comma should follow last multiline array item. found: ... 

line added in subversion pre-commit hook (it being executed):

# execute code sniffer drupal standards /usr/bin/scripts/phpcs-svn-pre-commit --standard=drupal --severity=4 "$repos" -t "$txn" >&2 || exit 1 

committing incorrect file:

$ svn commit -m "testing svn hook-precommit" ak_gourmet.module  enviando       ak_gourmet.module transmitiendo contenido de archivos . commit de la revisiĆ³n 5814. 


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -