[PEPr] Comment on PHP::PHP_CodeSniffer
| From: | Laurent Laville | Date: | Mon, 07 Aug 2006 15:12:03 +0000 |
| Subject: | [PEPr] Comment on PHP::PHP_CodeSniffer | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-43645@lists.php.net to get a copy of this message | ||
Laurent Laville (http://pear.php.net/user/farell) has commented on the proposal for
PHP::PHP_CodeSniffer.
Comment:
While i added phpdoc tags to PEAR_PackageFileManager files and check with
CodeSniffer 0.0.2, i've found another piece of code that raise errors.
With a simply script as below and comments on lines 2,4,6 i got theses
results :
[LINE 2] ERROR: Format error: expected "\n" found " "
[LINE 4] ERROR: Format error: expected "\n" found " "
I think , after reading PEAR CS again, that it should be accepted,
(comment on same line of code, even on if-condition) isn't it ?
<pre>
<?php
if ($cond == $val) { // comment 1
continue;
} else { // comment 2
continue;
} // comment 3
$c = 1; // comment 4
print 'hello';
?>
</pre>
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=426
--
Sent by PEPr, the automatic proposal system at http://pear.php.net