cvs: peardoc /en/package/php php-codesniffer.xml /en/package/php/php-codesniffer advanced-usage.xml config-options.xml usage.xml
[email protected] ("Greg Sherwood")
| Newsgroups | php.pear.doc |
|---|---|
| Message-ID | <cvssquiz1190176832@cvsserver> |
squiz Wed Sep 19 04:40:33 2007 UTC
Added files:
/peardoc/en/package/php/php-codesniffer config-options.xml
Modified files:
/peardoc/en/package/php php-codesniffer.xml
/peardoc/en/package/php/php-codesniffer advanced-usage.xml
usage.xml
Log:
Added documentation for the new --config-set and --config-show command line args. Also added docs for existing config options.
http://cvs.php.net/viewvc.cgi/peardoc/en/package/php/php-codesniffer.xml?r1=1.3&r2=1.4&diff_format=u
Index: peardoc/en/package/php/php-codesniffer.xml
diff -u peardoc/en/package/php/php-codesniffer.xml:1.3 peardoc/en/package/php/php-codesniffer.xml:1.4
--- peardoc/en/package/php/php-codesniffer.xml:1.3 Wed Apr 4 00:57:37 2007
+++ peardoc/en/package/php/php-codesniffer.xml Wed Sep 19 04:40:32 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<sect1 id="package.php.php-codesniffer">
<title>PHP_CodeSniffer</title>
<para>
@@ -17,6 +17,7 @@
&package.php.php-codesniffer.intro;
&package.php.php-codesniffer.usage;
&package.php.php-codesniffer.advanced-usage;
+ &package.php.php-codesniffer.config-options;
&package.php.php-codesniffer.coding-standard-tutorial;
&package.php.php-codesniffer.coding-standard-class;
&package.php.php-codesniffer.faq;
http://cvs.php.net/viewvc.cgi/peardoc/en/package/php/php-codesniffer/advanced-usage.xml?r1=1.3&r2=1.4&diff_format=u
Index: peardoc/en/package/php/php-codesniffer/advanced-usage.xml
diff -u peardoc/en/package/php/php-codesniffer/advanced-usage.xml:1.3 peardoc/en/package/php/php-codesniffer/advanced-usage.xml:1.4
--- peardoc/en/package/php/php-codesniffer/advanced-usage.xml:1.3 Fri Aug 3 00:05:43 2007
+++ peardoc/en/package/php/php-codesniffer/advanced-usage.xml Wed Sep 19 04:40:32 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="package.php.php-codesniffer.advanced-usage">
<refnamediv>
<refname>Advanced Usage</refname>
@@ -82,6 +82,56 @@
+ <refsect1 id="package.php.php-codesniffer.advanced-usage.config-set">
+ <title>Setting Configuration Options</title>
+ <para>
+ PHP_CodeSniffer has some configuration options that can be set. Individual coding standards may also require configuration options to be set before functionality can be used. <link linkend="package.php.php-codesniffer.config-options">View a full list of configuration options.</link>
+ </para>
+ <para>
+ To set a configuration option, use the <literal>--config-set</literal> command line argument.
+ </para>
+ <example>
+ <title>Setting a configuration option</title>
+ <screen>
+ <userinput>
+<![CDATA[
+$ phpcs --config-set <option> <value>
+]]>
+ </userinput>
+ </screen>
+ </example>
+ </refsect1>
+
+
+
+
+
+ <refsect1 id="package.php.php-codesniffer.advanced-usage.config-show">
+ <title>Viewing Configuration Options</title>
+ <para>
+ To view the currently set configuration options, use the <literal>--config-show</literal> command line argument.
+ </para>
+ <example>
+ <title>Viewing configuration options</title>
+ <screen>
+ <userinput>
+<![CDATA[
+$ phpcs --config-show
+Array
+(
+ [default_standard] => PEAR
+ [zend_ca_path] => /path/to/ZendCodeAnalyzer
+)
+]]>
+ </userinput>
+ </screen>
+ </example>
+ </refsect1>
+
+
+
+
+
<refsect1 id="package.php.php-codesniffer.advanced-usage.verbose-tokeniser-output">
<title>Printing Verbose Tokeniser Output</title>
<note>
http://cvs.php.net/viewvc.cgi/peardoc/en/package/php/php-codesniffer/usage.xml?r1=1.6&r2=1.7&diff_format=u
Index: peardoc/en/package/php/php-codesniffer/usage.xml
diff -u peardoc/en/package/php/php-codesniffer/usage.xml:1.6 peardoc/en/package/php/php-codesniffer/usage.xml:1.7
--- peardoc/en/package/php/php-codesniffer/usage.xml:1.6 Fri Aug 3 00:05:43 2007
+++ peardoc/en/package/php/php-codesniffer/usage.xml Wed Sep 19 04:40:32 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<refentry id="package.php.php-codesniffer.usage">
<refnamediv>
<refname>Usage</refname>
@@ -15,6 +15,7 @@
<screen>
<![CDATA[
Usage: phpcs [-nlvi] [--report=<report>] [--standard=<standard>]
+ [--config-set key value] [--config-show]
[--generator=<generator>] [--extensions=<extensions>]
[--ignore=<patterns>] <file> ...
-n Do not print warnings
@@ -37,7 +38,7 @@
</para>
<note>
<simpara>
- The <literal>--standard</literal> command line argument is optional, even if you have more than one coding standard installed. If no coding standard is specified, PHP_CodeSniffer will default to checking against the <emphasis>PEAR</emphasis> coding standard.
+ The <literal>--standard</literal> command line argument is optional, even if you have more than one coding standard installed. If no coding standard is specified, PHP_CodeSniffer will default to checking against the <emphasis>PEAR</emphasis> coding standard, or the standard you have set as the default. <link linkend="package.php.php-codesniffer.config-options.php-codesniffer.default-standard">View instructions for setting the default coding standard.</link>
</simpara>
</note>
</refsect1>
http://cvs.php.net/viewvc.cgi/peardoc/en/package/php/php-codesniffer/config-options.xml?view=markup&rev=1.1
Index: peardoc/en/package/php/php-codesniffer/config-options.xml
+++ peardoc/en/package/php/php-codesniffer/config-options.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- $Revision: 1.1 $ -->
<refentry id="package.php.php-codesniffer.config-options">
<refnamediv>
<refname>Configuration Options</refname>
<refpurpose>A list of configuration options</refpurpose>
</refnamediv>
<refsect1 id="package.php.php-codesniffer.config-options.php-codesniffer">
<title>PHP_CodeSniffer Configuration Options</title>
<refsect2 id="package.php.php-codesniffer.config-options.php-codesniffer.default-standard">
<title>Setting the Default Coding Standard</title>
<para>
By default, PHP_CodeSniffer will use the <emphasis>PEAR</emphasis> coding standard if no standard is supplied on the command line. You can change the default standard by setting the <literal>default_standard</literal> configuration option.
</para>
<example>
<title>Setting the default standard to be the Zend coding standard</title>
<screen>
<userinput>
<![CDATA[
$ phpcs --config-set default_standard Zend
]]>
</userinput>
</screen>
</example>
</refsect2>
</refsect1>
<refsect1 id="package.php.php-codesniffer.config-options.zend">
<title>Zend Coding Standard Configuration Options</title>
<refsect2 id="package.php.php-codesniffer.config-options.zend.zend-ca-path">
<title>Setting the Path to the Zend Code Analyzer</title>
<para>
The Zend coding standard includes a sniff that will check each file using the Zend Code Analyzer, a tool that comes with Zend Studio. Use the <literal>zend_ca_path</literal> configuration option to tell the Zend Code Analyzer sniff where to find the tool.
</para>
<example>
<title>Setting the path to Zend Code Analyzer</title>
<screen>
<userinput>
<![CDATA[
$ phpcs --config-set zend_ca_path /path/to/ZendCodeAnalyzer
]]>
</userinput>
</screen>
</example>
</refsect2>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->