[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pear-doc
Subject:    [PEAR-DOC] =?utf-8?q?svn:_/pear/peardoc/trunk/en/package/php/php-codesniffer/_reporting.xml_usage.xm
From:       Greg_Sherwood <squiz () php ! net>
Date:       2010-01-14 2:25:42
Message-ID: svn-squiz-1263435942-293529-316502952 () svn ! php ! net
[Download RAW message or body]

squiz                                    Thu, 14 Jan 2010 02:25:42 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=293529

Log:
Added docs for interactive mode

Changed paths:
    U   pear/peardoc/trunk/en/package/php/php-codesniffer/reporting.xml
    U   pear/peardoc/trunk/en/package/php/php-codesniffer/usage.xml

Modified: pear/peardoc/trunk/en/package/php/php-codesniffer/reporting.xml
===================================================================
--- pear/peardoc/trunk/en/package/php/php-codesniffer/reporting.xml	2010-01-13 \
                23:47:54 UTC (rev 293528)
+++ pear/peardoc/trunk/en/package/php/php-codesniffer/reporting.xml	2010-01-14 \
02:25:42 UTC (rev 293529) @@ -313,6 +313,38 @@
  </refsection>


+  <refsection xml:id="package.php.php-codesniffer.reporting.interactive"><info><title>Running \
Interactively</title></info> +  <para>
+   Instead of producing a single report at the end of a run, PHP_CodeSniffer can run \
interactively and show reports for files one at a time. When using the interactive \
mode, PHP_CodeSniffer will show a report for the first file it finds an error or \
warning in. It will then pause and wait for user input. Once you have corrected the \
errors, you can press <literal>ENTER</literal> to have PHP_CodeSniffer recheck your \
file and continue if the file is now free of errors. You can also choose to skip the \
file and move to the next file with errors. +  </para>
+  <para>
+   To run PHP_CodeSniffer interactively, use the <literal>-a</literal> command line \
argument. +  </para>
+  <example><info><title>Running interactively</title></info>
+   <screen>
+<![CDATA[
+$ phpcs -a /path/to/code
+
+FILE: /path/to/code/myfile.php
+--------------------------------------------------------------------------------
+FOUND 5 ERROR(S) AND 1 WARNING(S) AFFECTING 5 LINE(S)
+--------------------------------------------------------------------------------
+  2 | ERROR   | Missing file doc comment
+ 20 | ERROR   | PHP keywords must be lowercase; expected "false" but found
+    |         | "FALSE"
+ 47 | ERROR   | Line not indented correctly; expected 4 spaces but found 1
+ 47 | WARNING | Equals sign not aligned with surrounding assignments
+ 51 | ERROR   | Missing function doc comment
+ 88 | ERROR   | Line not indented correctly; expected 9 spaces but found 6
+--------------------------------------------------------------------------------
+
+<ENTER> to recheck, [s] to skip or [q] to quit :
+]]>
+   </screen>
+  </example>
+ </refsection>
+
+
  <refsection xml:id="package.php.php-codesniffer.reporting.report-width"><info><title>Specifying \
a Report Width</title></info>  <para>
    By default, PHP_CodeSniffer will print all screen-based reports 80 characters \
wide. File paths will be truncated if they don't fit within this limit and error \
messages will be wrapped across multiple lines. You can increase the report width to \
show longer file paths and limit the wrapping of error messages using the \
<literal>-report-width</literal> command line argument.

Modified: pear/peardoc/trunk/en/package/php/php-codesniffer/usage.xml
===================================================================
--- pear/peardoc/trunk/en/package/php/php-codesniffer/usage.xml	2010-01-13 23:47:54 \
                UTC (rev 293528)
+++ pear/peardoc/trunk/en/package/php/php-codesniffer/usage.xml	2010-01-14 02:25:42 \
UTC (rev 293529) @@ -12,7 +12,7 @@
   <para>
    <screen>
 <![CDATA[
-Usage: phpcs [-nwlsvi] [--extensions=<extensions>] [--ignore=<patterns>]
+Usage: phpcs [-nwlsavi] [--extensions=<extensions>] [--ignore=<patterns>]
     [--report=<report>] [--report-width=<reportWidth>] [--report-file=<reportfile>]
     [--config-set key value] [--config-delete key] [--config-show]
     [--standard=<standard>] [--sniffs=<sniffs>]
@@ -21,6 +21,7 @@
         -w            Print both warnings and errors (on by default)
         -l            Local directory only, no recursion
         -s            Show sniff codes in all reports
+        -a            Run interactively
         -v[v][v]      Print verbose output
         -i            Show a list of installed coding standards
         --help        Print this help message



-- 
PEAR Documentation List Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic