benmatselby / sublime-phpcs

🔍 PHP CodeSniffer, PHP Coding Standard Fixer, Linter, and Mess Detector Support for Sublime Text
Other
812 stars 126 forks source link

phpcs return on ubuntu not being passed or used #27

Closed JeremyHutchings closed 12 years ago

JeremyHutchings commented 12 years ago

Hi,

I've got ST2 set up with the phpcs packcage installed and phpcs on the system, though when I run it does nothing in the main window, but turning on debug and checking the console gives the following, so phpcs is returning :

Any ideas ?

[Phpcs] /usr/bin/phpcs - --report=checkstyle -n --standard=PEAR /media/mirrorstore/programming/project/trunk/controllers/event.php
[Phpcs] <?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="1.1.0">
 <file name="/media/mirrorstore/programming/eatradar/trunk/controllers/event.php">
  <error line="1" column="7" severity="warning" message="Inline control structures are discouraged"/>
  <error line="1" column="7" severity="error" message="Missing file doc comment"/>
  <error line="3" column="1" severity="error" message="Missing class doc comment"/>
  <error line="4" column="1" severity="error" message="Expected 0 spaces before opening brace; 1 found"/>
  <error line="5" column="2" severity="error" message="Line indented incorrectly; expected at least 4 spaces, found 1"/>
  <error line="5" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="5" column="9" severity="error" message="Line indented incorrectly; expected 4 spaces, found 1"/>
  <error line="5" column="9" severity="error" message="Missing function doc comment"/>
  <error line="6" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="7" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="7" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="9" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="9" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="10" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="10" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="11" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="13" column="2" severity="error" message="Line indented incorrectly; expected at least 4 spaces, found 1"/>
  <error line="13" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="13" column="9" severity="error" message="Line indented incorrectly; expected 4 spaces, found 1"/>
  <error line="13" column="9" severity="error" message="Missing function doc comment"/>
  <error line="14" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="15" column="6" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 5"/>
  <error line="15" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="16" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="17" column="6" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 5"/>
  <error line="17" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="18" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="19" column="6" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 5"/>
  <error line="19" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="19" column="26" severity="warning" message="Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space"/>
  <error line="20" column="6" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 5"/>
  <error line="20" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="20" column="28" severity="warning" message="Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space"/>
  <error line="21" column="6" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 5"/>
  <error line="21" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="21" column="26" severity="warning" message="Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space"/>
  <error line="22" column="6" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 5"/>
  <error line="22" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="23" column="6" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 5"/>
  <error line="23" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="23" column="27" severity="warning" message="Equals sign not aligned with surrounding assignments; expected 3 spaces but found 1 space"/>
  <error line="24" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="25" column="6" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 5"/>
  <error line="25" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="26" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="27" column="6" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 5"/>
  <error line="27" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="28" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="29" column="6" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 5"/>
  <error line="29" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="30" column="1" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 6"/>
  <error line="31" column="1" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 6"/>
  <error line="33" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="33" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="36" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="37" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="38" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="39" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="40" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="41" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="42" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="43" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="46" column="9" severity="error" message="Expected &quot;foreach (...) {\n&quot;; found &quot;foreach(...)\n      {\n&quot;"/>
  <error line="46" column="162" severity="warning" message="Line exceeds 85 characters; contains 161 characters"/>
  <error line="47" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="49" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="49" column="108" severity="warning" message="Line exceeds 85 characters; contains 107 characters"/>
  <error line="51" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="52" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="53" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="54" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="55" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="55" column="88" severity="warning" message="Line exceeds 85 characters; contains 87 characters"/>
  <error line="56" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="58" column="3" severity="error" message="Closing brace indented incorrectly; expected 8 spaces, found 2"/>
  <error line="58" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="59" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="60" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="60" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="61" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="62" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="62" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="63" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="63" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="64" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="64" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="65" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="65" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="66" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="67" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="68" column="2" severity="error" message="Line indented incorrectly; expected at least 4 spaces, found 1"/>
  <error line="68" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="68" column="9" severity="error" message="Line indented incorrectly; expected 4 spaces, found 1"/>
  <error line="68" column="9" severity="error" message="You must use &quot;/**&quot; style comments for a function comment"/>
  <error line="69" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="70" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="70" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="71" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="72" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="72" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="73" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="73" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="75" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="75" column="3" severity="error" message="Line indented incorrectly; expected 8 spaces, found 2"/>
  <error line="75" column="3" severity="error" message="Expected &quot;if (...) {\n&quot;; found &quot;if (...)\n       {               \n&quot;"/>
  <error line="75" column="51" severity="error" message="TRUE, FALSE and NULL must be lowercase; expected &quot;false&quot; but found &quot;FALSE&quot;"/>
  <error line="76" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="77" column="4" severity="error" message="Line indented incorrectly; expected at least 12 spaces, found 3"/>
  <error line="77" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="78" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="79" column="4" severity="error" message="Line indented incorrectly; expected at least 12 spaces, found 3"/>
  <error line="79" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="80" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="81" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="81" column="3" severity="error" message="Line indented incorrectly; expected 8 spaces, found 2"/>
  <error line="81" column="3" severity="error" message="Expected &quot;} else {\n&quot;; found &quot;}\n        else\n      {\n&quot;"/>
  <error line="82" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="84" column="4" severity="error" message="Line indented incorrectly; expected at least 12 spaces, found 3"/>
  <error line="84" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="86" column="4" severity="error" message="Line indented incorrectly; expected at least 12 spaces, found 3"/>
  <error line="86" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="87" column="5" severity="error" message="Line indented incorrectly; expected at least 12 spaces, found 4"/>
  <error line="87" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="88" column="5" severity="error" message="Line indented incorrectly; expected at least 12 spaces, found 4"/>
  <error line="88" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="89" column="5" severity="error" message="Line indented incorrectly; expected at least 12 spaces, found 4"/>
  <error line="89" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="90" column="5" severity="error" message="Line indented incorrectly; expected at least 12 spaces, found 4"/>
  <error line="90" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="91" column="5" severity="error" message="Line indented incorrectly; expected at least 12 spaces, found 4"/>
  <error line="91" column="5" severity="error" message="Perl-style comments are not allowed. Use &quot;// Comment.&quot; or &quot;/* comment */&quot; instead."/>
  <error line="91" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="92" column="5" severity="error" message="Line indented incorrectly; expected at least 12 spaces, found 4"/>
  <error line="92" column="5" severity="error" message="Perl-style comments are not allowed. Use &quot;// Comment.&quot; or &quot;/* comment */&quot; instead."/>
  <error line="92" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="93" column="4" severity="error" message="Line indented incorrectly; expected at least 12 spaces, found 3"/>
  <error line="93" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="94" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="95" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="95" column="4" severity="error" message="Line indented incorrectly; expected 12 spaces, found 3"/>
  <error line="95" column="4" severity="error" message="Expected &quot;if (...) {\n&quot;; found &quot;if (...)\n           {\n&quot;"/>
  <error line="96" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="97" column="5" severity="error" message="Line indented incorrectly; expected at least 16 spaces, found 4"/>
  <error line="97" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="98" column="5" severity="error" message="Line indented incorrectly; expected at least 16 spaces, found 4"/>
  <error line="98" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="99" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="100" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="100" column="4" severity="error" message="Line indented incorrectly; expected 12 spaces, found 3"/>
  <error line="100" column="4" severity="error" message="Expected &quot;} else {\n&quot;; found &quot;}\n           else\n          {\n&quot;"/>
  <error line="101" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="102" column="5" severity="error" message="Line indented incorrectly; expected at least 16 spaces, found 4"/>
  <error line="102" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="103" column="5" severity="error" message="Line indented incorrectly; expected at least 16 spaces, found 4"/>
  <error line="103" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="104" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="105" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="106" column="4" severity="error" message="Line indented incorrectly; expected at least 12 spaces, found 3"/>
  <error line="106" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="107" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="108" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="109" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="109" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="110" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="112" column="2" severity="error" message="Line indented incorrectly; expected at least 4 spaces, found 1"/>
  <error line="112" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="112" column="9" severity="error" message="Line indented incorrectly; expected 4 spaces, found 1"/>
  <error line="112" column="9" severity="error" message="You must use &quot;/**&quot; style comments for a function comment"/>
  <error line="113" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="114" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="114" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="115" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="116" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="116" column="3" severity="error" message="Line indented incorrectly; expected 8 spaces, found 2"/>
  <error line="116" column="3" severity="error" message="Expected &quot;if (...) {\n&quot;; found &quot;if (...)\n      {\n&quot;"/>
  <error line="117" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="118" column="4" severity="error" message="Line indented incorrectly; expected at least 12 spaces, found 3"/>
  <error line="118" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="119" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="120" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="121" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="121" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="122" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="123" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="123" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="124" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="124" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="125" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="125" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="126" column="3" severity="error" message="Line indented incorrectly; expected at least 8 spaces, found 2"/>
  <error line="126" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed"/>
  <error line="127" column="5" severity="error" message="Closing brace indented incorrectly; expected 1 spaces, found 4"/>
 </file>
</checkstyle>

[Phpcs] Linter found 0 errors
[Phpcs] Sniffer found 0 errors
[Phpcs] MessDetector found 0 errors
benmatselby commented 12 years ago

It looks like you are running an old version of PHP_CodeSniffer:

<checkstyle version="1.1.0">

I've only tested with 1.3.* and above as mentioned in the README. It looks like the regex is not finding the lines as the version of PHP_CodeSniffer you are running does not add source="" in the report. Is there any chance you can upgrade the PHP_CodeSniffer or do you have to work with this version?

JeremyHutchings commented 12 years ago

Spot on thanks - I'd grabbed 1.1.0 from apt-get and not 1.3.4 from pear.

benmatselby commented 12 years ago

No problem, glad it is resolved.