<?xml version="1.0"?>
<?xml-stylesheet
href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/search.php">
    <title>PEAR Bug Search Results</title>
    <link>http://pear.php.net/bugs/search.php?cmd=display&amp;package_name%5B0%5D=PHP_CodeSniffer</link>
    <description>Search Results</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bug/16836" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16740" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16694" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16693" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16209" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16163" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16114" />
      <rdf:li rdf:resource="http://pear.php.net/bug/15865" />
      <rdf:li rdf:resource="http://pear.php.net/bug/15338" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14699" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14237" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14074" />
      <rdf:li rdf:resource="http://pear.php.net/bug/13813" />
      <rdf:li rdf:resource="http://pear.php.net/bug/13774" />
      <rdf:li rdf:resource="http://pear.php.net/bug/12544" />
      <rdf:li rdf:resource="http://pear.php.net/bug/12434" />

     </rdf:Seq>
    </items>
  </channel>

  <image rdf:about="http://pear.php.net/gifs/pearsmall.gif">
    <title>PEAR Bugs</title>
    <url>http://pear.php.net/gifs/pearsmall.gif</url>
    <link>http://pear.php.net/bugs</link>
  </image>

    <item rdf:about="http://pear.php.net/bug/16836">
      <title>PHP_CodeSniffer: Bug 16836 [Verified] Notice Raised</title>
      <link>http://pear.php.net/bugs/16836</link>
      <content:encoded><![CDATA[<pre>PHP_CodeSniffer Bug
Reported by marynicolehicks
2009-11-26T05:11:10+00:00
PHP: 5.2.5 OS: Windows Vista 32 Package Version: 1.2.1

Description:
------------
NOTICE: Undefined index:  scope_closer in D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer\Tokenizers\PHP.php on line 459

Test script:
---------------
Should be easy to spot in the code.

Expected result:
----------------
Expect no notices in logs.

Actual result:
--------------
2009-11-26T16:54:15+13:00 ERR (3): NOTICE: Undefined index:  scope_closer in D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer\Tokenizers\PHP.php on line 459
#0 D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer\Tokenizers\PHP.php(459): My_Log-&gt;LogErrorHandler(8, 'Undefined index...', 'D:\My Documents...', 459, Array)
#1 D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer\File.php(772): PHP_CodeSniffer_Tokenizers_PHP-&gt;processAdditional(Array, '??')
#2 D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer\File.php(512): PHP_CodeSniffer_File::tokenizeString('&lt;?php????/**?? ...', Object(PHP_CodeSniffer_Tokenizers_PHP), '??')
#3 D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer\File.php(362): PHP_CodeSniffer_File-&gt;_parse(NULL)
#4 D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer.php(784): PHP_CodeSniffer_File-&gt;start(NULL)
#5 D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer.php(690): PHP_CodeSniffer-&gt;processFile('D:\My Documents...')
#6 D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer.php(341): PHP_CodeSniffer-&gt;processFiles('D:\My Documents...', false)
#7 D:\My Documents\My Websites\DreamHost\fms\test\CodeSniffer\RunCodeSniffer.php(20): PHP_CodeSniffer-&gt;process(Array, 'D:\My Documents...')
#8 D:\My Documents\My Websites\DreamHost\fms\test\UnitTests.php(173): include('D:\My Documents...')
#9 D:\My Documents\My Websites\DreamHost\fms\test\UnitTests.php(108): UnitTests-&gt;runCodeSniffer()
#10 D:\My Documents\My Websites\DreamHost\fms\test\UnitTests.php(78): UnitTests-&gt;__construct(Object(Zend_Console_Getopt))
#11 {main}</pre>]]></content:encoded>
      <description><![CDATA[<pre>PHP_CodeSniffer Bug
Reported by marynicolehicks
2009-11-26T05:11:10+00:00
PHP: 5.2.5 OS: Windows Vista 32 Package Version: 1.2.1

Description:
------------
NOTICE: Undefined index:  scope_closer in D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer\Tokenizers\PHP.php on line 459

Test script:
---------------
Should be easy to spot in the code.

Expected result:
----------------
Expect no notices in logs.

Actual result:
--------------
2009-11-26T16:54:15+13:00 ERR (3): NOTICE: Undefined index:  scope_closer in D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer\Tokenizers\PHP.php on line 459
#0 D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer\Tokenizers\PHP.php(459): My_Log-&gt;LogErrorHandler(8, 'Undefined index...', 'D:\My Documents...', 459, Array)
#1 D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer\File.php(772): PHP_CodeSniffer_Tokenizers_PHP-&gt;processAdditional(Array, '??')
#2 D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer\File.php(512): PHP_CodeSniffer_File::tokenizeString('&lt;?php????/**?? ...', Object(PHP_CodeSniffer_Tokenizers_PHP), '??')
#3 D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer\File.php(362): PHP_CodeSniffer_File-&gt;_parse(NULL)
#4 D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer.php(784): PHP_CodeSniffer_File-&gt;start(NULL)
#5 D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer.php(690): PHP_CodeSniffer-&gt;processFile('D:\My Documents...')
#6 D:\My Documents\My Websites\DreamHost\fms\library\Pear\pear\PHP\CodeSniffer.php(341): PHP_CodeSniffer-&gt;processFiles('D:\My Documents...', false)
#7 D:\My Documents\My Websites\DreamHost\fms\test\CodeSniffer\RunCodeSniffer.php(20): PHP_CodeSniffer-&gt;process(Array, 'D:\My Documents...')
#8 D:\My Documents\My Websites\DreamHost\fms\test\UnitTests.php(173): include('D:\My Documents...')
#9 D:\My Documents\My Websites\DreamHost\fms\test\UnitTests.php(108): UnitTests-&gt;runCodeSniffer()
#10 D:\My Documents\My Websites\DreamHost\fms\test\UnitTests.php(78): UnitTests-&gt;__construct(Object(Zend_Console_Getopt))
#11 {main}</pre>]]></description>
      <dc:date>2009-11-26T10:22:46+00:00</dc:date>
      <dc:creator>xxx &amp;#x61;&amp;#116; marynicolehicks &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>PHP_CodeSniffer Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16740">
      <title>PHP_CodeSniffer: Bug 16740 [Open] False positives for heredoc strings and unused parameter sniff</title>
      <link>http://pear.php.net/bugs/16740</link>
      <content:encoded><![CDATA[<pre>PHP_CodeSniffer Bug
Reported by sebastian
2009-10-25T18:32:36+00:00
PHP: 5.3.0 OS: Irrelevant Package Version: 1.2.0

Description:
------------
A function or method parameter that is only used in an heredoc string is reported as not being used.

Test script:
---------------
&lt;?php
function foo($bar)
{
    print &lt;&lt;&lt;BAZ
... $bar ...
BAZ
}

Expected result:
----------------
No violation.

Actual result:
--------------
FILE: /home/sb/test.php
--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
 2 | WARNING | The method parameter $bar is never used
--------------------------------------------------------------------------------</pre>]]></content:encoded>
      <description><![CDATA[<pre>PHP_CodeSniffer Bug
Reported by sebastian
2009-10-25T18:32:36+00:00
PHP: 5.3.0 OS: Irrelevant Package Version: 1.2.0

Description:
------------
A function or method parameter that is only used in an heredoc string is reported as not being used.

Test script:
---------------
&lt;?php
function foo($bar)
{
    print &lt;&lt;&lt;BAZ
... $bar ...
BAZ
}

Expected result:
----------------
No violation.

Actual result:
--------------
FILE: /home/sb/test.php
--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
 2 | WARNING | The method parameter $bar is never used
--------------------------------------------------------------------------------</pre>]]></description>
      <dc:date>2009-10-25T18:32:36+00:00</dc:date>
      <dc:creator>sb &amp;#x61;&amp;#116; sebastian-bergmann &amp;#x64;&amp;#111;&amp;#x74; de</dc:creator>
      <dc:subject>PHP_CodeSniffer Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16694">
      <title>PHP_CodeSniffer: Feature/Change Request 16694 [Open] Sniff for deprecated functions</title>
      <link>http://pear.php.net/bugs/16694</link>
      <content:encoded><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by sebastian
2009-10-12T13:49:24+00:00
PHP: Irrelevant OS: Irrelevant Package Version: CVS

Description:
------------
A specialization of Generic_Sniffs_PHP_ForbiddenFunctionsSniff would be nice that scans for deprecated functions in PHP.

Please find a proof-of-concept implementation attached.</pre>]]></content:encoded>
      <description><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by sebastian
2009-10-12T13:49:24+00:00
PHP: Irrelevant OS: Irrelevant Package Version: CVS

Description:
------------
A specialization of Generic_Sniffs_PHP_ForbiddenFunctionsSniff would be nice that scans for deprecated functions in PHP.

Please find a proof-of-concept implementation attached.</pre>]]></description>
      <dc:date>2009-10-12T13:49:24+00:00</dc:date>
      <dc:creator>sb &amp;#x61;&amp;#116; sebastian-bergmann &amp;#x64;&amp;#111;&amp;#x74; de</dc:creator>
      <dc:subject>PHP_CodeSniffer Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16693">
      <title>PHP_CodeSniffer: Feature/Change Request 16693 [Open] Support for incremental scans</title>
      <link>http://pear.php.net/bugs/16693</link>
      <content:encoded><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by sebastian
2009-10-12T13:13:33+00:00
PHP: Irrelevant OS: Irrelevant Package Version: CVS

Description:
------------
Running phpcs on a large code base in the context of continuous integration can be very time consuming. Just because a couple of files have changed (for which phpcs would run for a couple of seconds or minutes) should not mean that phpcs needs to be run for all files again (which can take an hour).

It would be beneficial if phpcs could be pointed to a previously generated Checkstyle XML logfile and be given a list of changed files. It would then scan the changed files and update the relevant sections of the Checkstyle XML logfile.

I am not entirely sure whether this functionality belongs into phpcs itself or if it should be implemented in phpUnderControl, for instance.</pre>]]></content:encoded>
      <description><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by sebastian
2009-10-12T13:13:33+00:00
PHP: Irrelevant OS: Irrelevant Package Version: CVS

Description:
------------
Running phpcs on a large code base in the context of continuous integration can be very time consuming. Just because a couple of files have changed (for which phpcs would run for a couple of seconds or minutes) should not mean that phpcs needs to be run for all files again (which can take an hour).

It would be beneficial if phpcs could be pointed to a previously generated Checkstyle XML logfile and be given a list of changed files. It would then scan the changed files and update the relevant sections of the Checkstyle XML logfile.

I am not entirely sure whether this functionality belongs into phpcs itself or if it should be implemented in phpUnderControl, for instance.</pre>]]></description>
      <dc:date>2009-10-12T13:13:33+00:00</dc:date>
      <dc:creator>sb &amp;#x61;&amp;#116; sebastian-bergmann &amp;#x64;&amp;#111;&amp;#x74; de</dc:creator>
      <dc:subject>PHP_CodeSniffer Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16209">
      <title>PHP_CodeSniffer: Feature/Change Request 16209 [Assigned] Sniffs for PHPUnit tests that to not assert anything</title>
      <link>http://pear.php.net/bugs/16209</link>
      <content:encoded><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by sebastian
2009-05-09T10:12:30+00:00
PHP: Irrelevant OS: Irrelevant Package Version: CVS

Description:
------------
A case of &quot;useless tests&quot; that I see from time to time is that developers write tests that execution SUT code without asserting -- thus not actually testing -- anything.

The sniff should raise a warning when the following conditions are met:
- Class has PHPUnit_Framework_TestCase as an ancestor
- Method is public and has name test*() or the @test annotation
- The method itself (and other methods called from it) does not call $this-&gt;assert*(), self::assert*(), or PHPUnit_Framework_Assert::assert*() and does not set up a mock object with expectations.

Test script:
---------------
.

Expected result:
----------------
.

Actual result:
--------------
.</pre>]]></content:encoded>
      <description><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by sebastian
2009-05-09T10:12:30+00:00
PHP: Irrelevant OS: Irrelevant Package Version: CVS

Description:
------------
A case of &quot;useless tests&quot; that I see from time to time is that developers write tests that execution SUT code without asserting -- thus not actually testing -- anything.

The sniff should raise a warning when the following conditions are met:
- Class has PHPUnit_Framework_TestCase as an ancestor
- Method is public and has name test*() or the @test annotation
- The method itself (and other methods called from it) does not call $this-&gt;assert*(), self::assert*(), or PHPUnit_Framework_Assert::assert*() and does not set up a mock object with expectations.

Test script:
---------------
.

Expected result:
----------------
.

Actual result:
--------------
.</pre>]]></description>
      <dc:date>2009-07-02T07:41:32+00:00</dc:date>
      <dc:creator>sb &amp;#x61;&amp;#116; sebastian-bergmann &amp;#x64;&amp;#111;&amp;#x74; de</dc:creator>
      <dc:subject>PHP_CodeSniffer Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16163">
      <title>PHP_CodeSniffer: Feature/Change Request 16163 [Assigned] Allow error messges to be overridden when extended sniffs</title>
      <link>http://pear.php.net/bugs/16163</link>
      <content:encoded><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by gimler
2009-04-30T09:28:04+00:00
PHP: 5.2.9 OS:  Package Version: 1.2.0RC1

Description:
------------
please move the hardcoded value in file PEAR/Sniffs/Commenting/FileCommentSniff.php at line 287+578 to a property to easy override when i extends this class in my own standard. tanks</pre>]]></content:encoded>
      <description><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by gimler
2009-04-30T09:28:04+00:00
PHP: 5.2.9 OS:  Package Version: 1.2.0RC1

Description:
------------
please move the hardcoded value in file PEAR/Sniffs/Commenting/FileCommentSniff.php at line 287+578 to a property to easy override when i extends this class in my own standard. tanks</pre>]]></description>
      <dc:date>2009-07-02T07:38:25+00:00</dc:date>
      <dc:creator>gfranke &amp;#x61;&amp;#116; savedcite &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>PHP_CodeSniffer Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16114">
      <title>PHP_CodeSniffer: Feature/Change Request 16114 [Assigned] Find unused functions, methods, classes</title>
      <link>http://pear.php.net/bugs/16114</link>
      <content:encoded><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by sebastian
2009-04-17T10:54:15+00:00
PHP: Irrelevant OS: Irrelevant Package Version: CVS

Description:
------------
Multi-File/Multi-Pass sniff that first collects a list of all declared functions and methods and then checks whether each is called at least once. A function/method that is not called should then be reported as an error.</pre>]]></content:encoded>
      <description><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by sebastian
2009-04-17T10:54:15+00:00
PHP: Irrelevant OS: Irrelevant Package Version: CVS

Description:
------------
Multi-File/Multi-Pass sniff that first collects a list of all declared functions and methods and then checks whether each is called at least once. A function/method that is not called should then be reported as an error.</pre>]]></description>
      <dc:date>2009-07-02T07:31:10+00:00</dc:date>
      <dc:creator>sb &amp;#x61;&amp;#116; sebastian-bergmann &amp;#x64;&amp;#111;&amp;#x74; de</dc:creator>
      <dc:subject>PHP_CodeSniffer Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/15865">
      <title>PHP_CodeSniffer: Feature/Change Request 15865 [Assigned] Sniff to help ensure use of multibyte functions</title>
      <link>http://pear.php.net/bugs/15865</link>
      <content:encoded><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by dfgsdfgsdfgdff
2009-02-02T15:08:59+00:00
PHP: 5.2.4 OS:  Package Version: 1.2.0a1

Description:
------------
It would be great if codesniffer could help ensure code is multibyte. This would mean adding a sniff that does not allow the use of strlen (should use mb_strlen) etc.</pre>]]></content:encoded>
      <description><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by dfgsdfgsdfgdff
2009-02-02T15:08:59+00:00
PHP: 5.2.4 OS:  Package Version: 1.2.0a1

Description:
------------
It would be great if codesniffer could help ensure code is multibyte. This would mean adding a sniff that does not allow the use of strlen (should use mb_strlen) etc.</pre>]]></description>
      <dc:date>2009-07-02T07:24:42+00:00</dc:date>
      <dc:creator>pear &amp;#x61;&amp;#116; infoweb &amp;#x64;&amp;#111;&amp;#x74; co &amp;#x64;&amp;#111;&amp;#x74; nz</dc:creator>
      <dc:subject>PHP_CodeSniffer Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/15338">
      <title>PHP_CodeSniffer: Feature/Change Request 15338 [Assigned] Add INFO message level</title>
      <link>http://pear.php.net/bugs/15338</link>
      <content:encoded><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by squiz
2008-12-17T18:09:36+00:00
PHP: Irrelevant OS: Any Package Version: CVS

Description:
------------
A new INFO message level, hidden by default, would allow standards to include additional checks that users could turn on to try and meet a higher level of standard. Examples of standards that may benefit are Line Length and Cyclomatic Complexity, which are useful but not always integrated into a standard offically.</pre>]]></content:encoded>
      <description><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by squiz
2008-12-17T18:09:36+00:00
PHP: Irrelevant OS: Any Package Version: CVS

Description:
------------
A new INFO message level, hidden by default, would allow standards to include additional checks that users could turn on to try and meet a higher level of standard. Examples of standards that may benefit are Line Length and Cyclomatic Complexity, which are useful but not always integrated into a standard offically.</pre>]]></description>
      <dc:date>2008-12-18T18:58:40+00:00</dc:date>
      <dc:creator>gsherwood &amp;#x61;&amp;#116; squiz &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>PHP_CodeSniffer Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14699">
      <title>PHP_CodeSniffer: Feature/Change Request 14699 [Assigned] PEAR FileCommentSniff makes bad inheritence choice</title>
      <link>http://pear.php.net/bugs/14699</link>
      <content:encoded><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by beyer
2008-09-24T05:59:13+00:00
PHP: 5.2.1 OS: Linux Package Version: 1.1.0

Description:
------------
The PEAR FileCommentSniff is quite unextendable due to the weak docblock choice. File Comments are falsely returned as wrong class comments.</pre>]]></content:encoded>
      <description><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by beyer
2008-09-24T05:59:13+00:00
PHP: 5.2.1 OS: Linux Package Version: 1.1.0

Description:
------------
The PEAR FileCommentSniff is quite unextendable due to the weak docblock choice. File Comments are falsely returned as wrong class comments.</pre>]]></description>
      <dc:date>2008-11-13T17:59:04+00:00</dc:date>
      <dc:creator>m &amp;#x64;&amp;#111;&amp;#x74; beyer5 &amp;#x61;&amp;#116; gmx &amp;#x64;&amp;#111;&amp;#x74; de</dc:creator>
      <dc:subject>PHP_CodeSniffer Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14237">
      <title>PHP_CodeSniffer: Feature/Change Request 14237 [Assigned] Line length should be measured by mb_strwidth</title>
      <link>http://pear.php.net/bugs/14237</link>
      <content:encoded><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by miau
2008-06-25T11:18:53+00:00
PHP: 5.2.5 OS:  Package Version: 1.1.0RC2

Description:
------------
While most multi-byte characters are reprenseted by 3 octet in UTF-8, they
take up 2 character widths.

Test script:
---------------
&gt;cat php.ini | grep mbstring.internal_encoding
mbstring.internal_encoding = UTF-8
; mbstring.internal_encoding setting. Input chars are
; given by corresponding encode setting. When empty mbstring.internal_encoding

&gt;php -i | grep mbstring.internal_encoding
mbstring.internal_encoding =&gt; UTF-8 =&gt; UTF-8

&gt;phpcs --standard=Zend multi_byte_sample.php


Expected result:
----------------
 2 | WARNING | Line exceeds 80 characters; contains 81 characters


Actual result:
--------------
 2 | WARNING | Line exceeds 80 characters; contains 86 characters</pre>]]></content:encoded>
      <description><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by miau
2008-06-25T11:18:53+00:00
PHP: 5.2.5 OS:  Package Version: 1.1.0RC2

Description:
------------
While most multi-byte characters are reprenseted by 3 octet in UTF-8, they
take up 2 character widths.

Test script:
---------------
&gt;cat php.ini | grep mbstring.internal_encoding
mbstring.internal_encoding = UTF-8
; mbstring.internal_encoding setting. Input chars are
; given by corresponding encode setting. When empty mbstring.internal_encoding

&gt;php -i | grep mbstring.internal_encoding
mbstring.internal_encoding =&gt; UTF-8 =&gt; UTF-8

&gt;phpcs --standard=Zend multi_byte_sample.php


Expected result:
----------------
 2 | WARNING | Line exceeds 80 characters; contains 81 characters


Actual result:
--------------
 2 | WARNING | Line exceeds 80 characters; contains 86 characters</pre>]]></description>
      <dc:date>2008-06-30T00:00:39+00:00</dc:date>
      <dc:creator>miau &amp;#x64;&amp;#111;&amp;#x74; jp &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>PHP_CodeSniffer Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14074">
      <title>PHP_CodeSniffer: Feature/Change Request 14074 [Assigned] Log in Database, ala PHPUnit</title>
      <link>http://pear.php.net/bugs/14074</link>
      <content:encoded><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by doconnor
2008-06-04T22:14:57+00:00
PHP: 5.2.6 OS:  Package Version: 1.0.1

Description:
------------
One of the things which is really neat in PHPUnit is the ability to log a run into a database.

Scenario:
An organization runs unit tests, documentation, etc nightly. They wish to provide an easily queried set of data about coding style / standards - this enables them to examine it in the same tool as other logged data.
The codebase is significant, and makes the use of XML hard to scale (performance).</pre>]]></content:encoded>
      <description><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by doconnor
2008-06-04T22:14:57+00:00
PHP: 5.2.6 OS:  Package Version: 1.0.1

Description:
------------
One of the things which is really neat in PHPUnit is the ability to log a run into a database.

Scenario:
An organization runs unit tests, documentation, etc nightly. They wish to provide an easily queried set of data about coding style / standards - this enables them to examine it in the same tool as other logged data.
The codebase is significant, and makes the use of XML hard to scale (performance).</pre>]]></description>
      <dc:date>2009-05-04T14:31:26+00:00</dc:date>
      <dc:creator>daniel &amp;#x64;&amp;#111;&amp;#x74; oconnor &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>PHP_CodeSniffer Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/13813">
      <title>PHP_CodeSniffer: Feature/Change Request 13813 [Assigned] ScopeIndent with &quot;exact&quot; does not work properly</title>
      <link>http://pear.php.net/bugs/13813</link>
      <content:encoded><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by blacksheepkhan
2008-04-30T15:50:03+00:00
PHP: Irrelevant OS: Irrelevant Package Version: 1.1.0a1

Description:
------------
When the new ScopeIndentSniff is being extended to switch the &quot;exact&quot; boolean parameter on then it does not take in account doc indents.

Reason: We want to have all indents fixed to 4 spaces, not more. But documentation (inline) lines should be ignored because they are checked elsewhere.

Test script:
---------------
class anything
{
    /**
     * test
     */
    public function xxxx

Expected result:
----------------
No report expected because doc starts with 4 spaces and public also... 

The 1 space difference from within the doc (line * test and */) should be ignored.

Actual result:
--------------
Switching &quot;exact&quot; on throws error on &quot;* test&quot; and &quot;*/&quot; being 5 chars indent.

Switching &quot;exact&quot; would not throw an error when indention is more than 4 for public or other lines.</pre>]]></content:encoded>
      <description><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by blacksheepkhan
2008-04-30T15:50:03+00:00
PHP: Irrelevant OS: Irrelevant Package Version: 1.1.0a1

Description:
------------
When the new ScopeIndentSniff is being extended to switch the &quot;exact&quot; boolean parameter on then it does not take in account doc indents.

Reason: We want to have all indents fixed to 4 spaces, not more. But documentation (inline) lines should be ignored because they are checked elsewhere.

Test script:
---------------
class anything
{
    /**
     * test
     */
    public function xxxx

Expected result:
----------------
No report expected because doc starts with 4 spaces and public also... 

The 1 space difference from within the doc (line * test and */) should be ignored.

Actual result:
--------------
Switching &quot;exact&quot; on throws error on &quot;* test&quot; and &quot;*/&quot; being 5 chars indent.

Switching &quot;exact&quot; would not throw an error when indention is more than 4 for public or other lines.</pre>]]></description>
      <dc:date>2008-05-04T17:48:49+00:00</dc:date>
      <dc:creator>thomas &amp;#x64;&amp;#111;&amp;#x74; weidner &amp;#x61;&amp;#116; gmx &amp;#x64;&amp;#111;&amp;#x74; at</dc:creator>
      <dc:subject>PHP_CodeSniffer Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/13774">
      <title>PHP_CodeSniffer: Feature/Change Request 13774 [Assigned] Make coding standards separate packages</title>
      <link>http://pear.php.net/bugs/13774</link>
      <content:encoded><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by toxygene
2008-04-25T09:47:49+00:00
PHP: Irrelevant OS:  Package Version: 1.0.1

Description:
------------
The Zend Framework is developing it's own PHPCS standard files (http://framework.zend.com/svn/framework/trunk/incubator/tools/codingstandard/), but the name conflicts with the existing Zend standard in PHPCS.

I think it would make sense to remove the current Zend standard, or make it into a separate package (or make all the standards into separate packages).</pre>]]></content:encoded>
      <description><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by toxygene
2008-04-25T09:47:49+00:00
PHP: Irrelevant OS:  Package Version: 1.0.1

Description:
------------
The Zend Framework is developing it's own PHPCS standard files (http://framework.zend.com/svn/framework/trunk/incubator/tools/codingstandard/), but the name conflicts with the existing Zend standard in PHPCS.

I think it would make sense to remove the current Zend standard, or make it into a separate package (or make all the standards into separate packages).</pre>]]></description>
      <dc:date>2008-06-29T05:47:38+00:00</dc:date>
      <dc:creator>justin &amp;#x64;&amp;#111;&amp;#x74; hendrickson &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>PHP_CodeSniffer Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/12544">
      <title>PHP_CodeSniffer: Feature/Change Request 12544 [Assigned] extended --ignore pattern behavior</title>
      <link>http://pear.php.net/bugs/12544</link>
      <content:encoded><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by farell
2007-11-28T17:07:36+00:00
PHP: 5.2.4 OS: Windows XP Package Version: 1.0.0RC2

Description:
------------
phpcs CLI has already an option to ignore file(s) and directory(ies) from parsing.

phpcs [--ignore=&lt;pattern&gt;] &lt;file&gt;

Is it possible to change/upgrade its behavior and allow to :

READ a .cvsignore file contents to ignore all files/dir identified inside.

PEAR_PackageFileManager has something equivalent : @see [1] lines 106+ 109 (for merging options)

Why I ask this ? Because I think it could be usefull when a batch script  run a large analysis of many files/packages (as Christian Weiske did [2]) and we don't know (for each package) what are the files to exclude.

Also, consider that command line as a limit, and we can expect to have a command like :

phpcs --ignore=blah,blah,blah,blah,blah,blah,blah,blah,blah .... blah,blah,blah, ... very long list ...,blah,blah  &lt;file&gt;

Example : Yesterday I've commit some CS fixes on HTML_CSS, and I don't touched to CSS\Advanced.php because it's an old file written by Klaus Guenther. And this file was never be included in any public PEAR release of package HTML_CSS.


Report of Christian [2] is in this way a bit bogus, because CSS\Advanced.php is included and gave me again 42 errors and 12 warnings, while I just hope to have 12 errors and 0 warnings with phpcs 1.0.0RC2, and 0 error, 0 warning when 1.0.0RC3 will be released (fixing @throws tag must contain a comment) 

Thanks Greg !

[1] http://cvs.php.net/viewvc.cgi/pear/PEAR_PackageFileManager/PackageFileManager/Cvs.php?annotate=1.15
[2] http://pear.cweiske.de/overview.htm</pre>]]></content:encoded>
      <description><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by farell
2007-11-28T17:07:36+00:00
PHP: 5.2.4 OS: Windows XP Package Version: 1.0.0RC2

Description:
------------
phpcs CLI has already an option to ignore file(s) and directory(ies) from parsing.

phpcs [--ignore=&lt;pattern&gt;] &lt;file&gt;

Is it possible to change/upgrade its behavior and allow to :

READ a .cvsignore file contents to ignore all files/dir identified inside.

PEAR_PackageFileManager has something equivalent : @see [1] lines 106+ 109 (for merging options)

Why I ask this ? Because I think it could be usefull when a batch script  run a large analysis of many files/packages (as Christian Weiske did [2]) and we don't know (for each package) what are the files to exclude.

Also, consider that command line as a limit, and we can expect to have a command like :

phpcs --ignore=blah,blah,blah,blah,blah,blah,blah,blah,blah .... blah,blah,blah, ... very long list ...,blah,blah  &lt;file&gt;

Example : Yesterday I've commit some CS fixes on HTML_CSS, and I don't touched to CSS\Advanced.php because it's an old file written by Klaus Guenther. And this file was never be included in any public PEAR release of package HTML_CSS.


Report of Christian [2] is in this way a bit bogus, because CSS\Advanced.php is included and gave me again 42 errors and 12 warnings, while I just hope to have 12 errors and 0 warnings with phpcs 1.0.0RC2, and 0 error, 0 warning when 1.0.0RC3 will be released (fixing @throws tag must contain a comment) 

Thanks Greg !

[1] http://cvs.php.net/viewvc.cgi/pear/PEAR_PackageFileManager/PackageFileManager/Cvs.php?annotate=1.15
[2] http://pear.cweiske.de/overview.htm</pre>]]></description>
      <dc:date>2008-02-20T17:37:21+00:00</dc:date>
      <dc:creator>pear &amp;#x61;&amp;#116; laurent-laville &amp;#x64;&amp;#111;&amp;#x74; org</dc:creator>
      <dc:subject>PHP_CodeSniffer Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/12434">
      <title>PHP_CodeSniffer: Feature/Change Request 12434 [Assigned] allow several output renderers</title>
      <link>http://pear.php.net/bugs/12434</link>
      <content:encoded><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by cweiske
2007-11-13T06:32:37+00:00
PHP: Irrelevant OS:  Package Version: 1.0.0RC1

Description:
------------
It would be cool if one could use several output renderers at once. This would require that an output file could be specified at command line.

The feature is neccessary when you e.g. want to generate a complete overview about all files for developers, but only a short summary for status emails.
One solution would be to export to xml, and render the xml yourself - but phpcs already has the ability to render txt files, so I don't see why I should reinvent that.

I don't know how you implemented rendering, but IMO it'd be good if there'd be a &quot;root renderer&quot; that is used by phpcs internally. this renderer dispatches the logs to all registered renderer objects. That would allow using unlimited renderers for a phpcs sniff call.

See http://pear.php.net/package/Event_Dispatcher which does it similar.</pre>]]></content:encoded>
      <description><![CDATA[<pre>PHP_CodeSniffer Feature/Change Request
Reported by cweiske
2007-11-13T06:32:37+00:00
PHP: Irrelevant OS:  Package Version: 1.0.0RC1

Description:
------------
It would be cool if one could use several output renderers at once. This would require that an output file could be specified at command line.

The feature is neccessary when you e.g. want to generate a complete overview about all files for developers, but only a short summary for status emails.
One solution would be to export to xml, and render the xml yourself - but phpcs already has the ability to render txt files, so I don't see why I should reinvent that.

I don't know how you implemented rendering, but IMO it'd be good if there'd be a &quot;root renderer&quot; that is used by phpcs internally. this renderer dispatches the logs to all registered renderer objects. That would allow using unlimited renderers for a phpcs sniff call.

See http://pear.php.net/package/Event_Dispatcher which does it similar.</pre>]]></description>
      <dc:date>2008-02-20T17:37:09+00:00</dc:date>
      <dc:creator>cweiske &amp;#x61;&amp;#116; php &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>PHP_CodeSniffer Feature/Change Request</dc:subject>
    </item>
</rdf:RDF>
