Package: php-codesniffer
Version: 1.0.1-1
Severity: important

*** Please type your report below this line ***

If you try to use the "--config-set" argument to phpcs it tries to write
to a file in /usr. As well as violating policy this breaks having a
read/only /usr.

To fix this I suggest:
* Move CodeSniffer.conf to /etc/php-codesniffer/CodeSniffer.conf
* Alter phpcs to also look for ~/.phpcs/CodeSniffer.conf after reading
  the system wide file
* Alter phpcs to save to the ~/.phpcs... file when needed

(Paths are just an initial suggestion, feel free to choose something
better)

You should also ship the config with a note that it's actual PHP code,
and with comments covering major options (it should also not have a
closing PHP tag, but that's just my taste).

EG:
$ phpcs --config-set default_standard Zend
Warning:
file_put_contents(/usr/share/php/data/PHP_CodeSniffer/CodeSniffer.conf):
failed to open stream: Permission denied in
/usr/share/php/PHP/CodeSniffer.php on line 1554

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages php-codesniffer depends on:
ii  php5-cli                      5.2.5-3    command-line interpreter for the p

php-codesniffer recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to