svn: /pear/peardoc/trunk/en/package/php/php-codesniffer/ advanced-usage.xml usage.xml
[email protected] (Greg Sherwood) Tue, 07 Sep 2010 04:05:13 +0000
| Newsgroups | php.pear.doc |
|---|---|
| Message-ID | <[email protected]> |
squiz Tue, 07 Sep 2010 04:05:13 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=303127
Log:
Docs for the new -d command line argument
Changed paths:
U pear/peardoc/trunk/en/package/php/php-codesniffer/advanced-usage.xml
U pear/peardoc/trunk/en/package/php/php-codesniffer/usage.xml
Modified: pear/peardoc/trunk/en/package/php/php-codesniffer/advanced-usage.xml
===================================================================
--- pear/peardoc/trunk/en/package/php/php-codesniffer/advanced-usage.xml 2010-09-07 03:45:25 UTC (rev 303126)
+++ pear/peardoc/trunk/en/package/php/php-codesniffer/advanced-usage.xml 2010-09-07 04:05:13 UTC (rev 303127)
@@ -192,6 +192,27 @@
</refsection>
+ <refsection xml:id="package.php.php-codesniffer.advanced-usage.phpini"><info><title>Specifying php.ini Settings</title></info>
+ <para>
+ PHP_CodeSniffer allows you to set temporary php.ini settings during a run using the <literal>-d</literal> command line argument. The name of the php.ini setting must be specified on the command line, but the value is optional. If no value is set, the php.ini setting will be given a value of TRUE.
+ </para>
+ <example><info><title>Specifying a memory limit</title></info>
+ <screen>
+<![CDATA[
+$ phpcs -d memory_limit=32M /path/to/code
+]]>
+ </screen>
+ </example>
+ <example><info><title>Specifying multiple values</title></info>
+ <screen>
+<![CDATA[
+$ phpcs -d memory_limit=32M -d include_path=.:/php/includes /path/to/code
+]]>
+ </screen>
+ </example>
+ </refsection>
+
+
<refsection xml:id="package.php.php-codesniffer.advanced-usage.config-set"><info><title>Setting Configuration Options</title></info>
<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>
Modified: pear/peardoc/trunk/en/package/php/php-codesniffer/usage.xml
===================================================================
--- pear/peardoc/trunk/en/package/php/php-codesniffer/usage.xml 2010-09-07 03:45:25 UTC (rev 303126)
+++ pear/peardoc/trunk/en/package/php/php-codesniffer/usage.xml 2010-09-07 04:05:13 UTC (rev 303127)
@@ -12,7 +12,7 @@
<para>
<screen>
<![CDATA[
-Usage: phpcs [-nwlsavi] [--extensions=<extensions>] [--ignore=<patterns>]
+Usage: phpcs [-nwlsavi] [-d key[=value]] [--extensions=<extensions>] [--ignore=<patterns>]
[--report=<report>] [--report-width=<reportWidth>] [--report-file=<reportfile>]
[--severity=<severity>] [--error-severity=<severity>] [--warning-severity=<severity>]
[--config-set key value] [--config-delete key] [--config-show]
@@ -25,25 +25,23 @@
-a Run interactively
-v[v][v] Print verbose output
-i Show a list of installed coding standards
+ -d Set the [key] php.ini value to [value] or [true] if value is omitted
--help Print this help message
--version Print version information
<file> One or more files and/or directories to check
<extensions> A comma separated list of file extensions to check
(only valid if checking a directory)
- <patterns> A comma separated list of patterns that are used
- to ignore directories and files
+ <patterns> A comma separated list of patterns to ignore files and directories
<encoding> The encoding of the files being checked (default is iso-8859-1)
<sniffs> A comma separated list of sniff codes to limit the check to
(all sniffs must be part of the specified standard)
- <severity> The minimum severity that an error or warning must have
- for it to be displayed.
- <standard> The name of the coding standard to use
+ <severity> The minimum severity required to display an error or warning
+ <standard> The name or path of the coding standard to use
<tabWidth> The number of spaces each tab represents
<generator> The name of a doc generator to use
(forces doc generation instead of checking)
- <report> Print either the "full", "xml", "checkstyle",
- "csv", "emacs", "source", "summary",
- "svnblame" or "gitblame" report
+ <report> Print either the "full", "xml", "checkstyle", "csv", "emacs"
+ "source", "summary", "svnblame" or "gitblame" report
(the "full" report is printed by default)
<reportWidth> How many columns wide screen reports should be printed
<reportfile> Write the report to the specified file path