cvs: peardoc /en/package/php/php-codesniffer faq.xml
| From: | Greg Sherwood | Date: | Tue, 16 Jan 2007 05:03:46 +0000 |
| Subject: | cvs: peardoc /en/package/php/php-codesniffer faq.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-9319@lists.php.net to get a copy of this message | ||
squiz Tue Jan 16 05:03:46 2007 UTC
Modified files:
/peardoc/en/package/php/php-codesniffer faq.xml
Log:
Changed 'programlisting' sections to 'screen' sections + minor corrections.
http://cvs.php.net/viewvc.cgi/peardoc/en/package/php/php-codesniffer/faq.xml?r1=1.1&r2=1.2&diff_format=u
Index: peardoc/en/package/php/php-codesniffer/faq.xml
diff -u peardoc/en/package/php/php-codesniffer/faq.xml:1.1
peardoc/en/package/php/php-codesniffer/faq.xml:1.2
--- peardoc/en/package/php/php-codesniffer/faq.xml:1.1 Fri Jan 12 05:18:32 2007
+++ peardoc/en/package/php/php-codesniffer/faq.xml Tue Jan 16 05:03:46 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<refentry id="package.php.php-codesniffer.faq">
<refnamediv>
<refname>FAQ</refname>
@@ -34,26 +34,28 @@
<para>
You can easily check for parse errors in a file using the PHP command line interface and the
<literal>-l</literal> (lowercase L) option.
</para>
- <programlisting>
+ <para>
+ <screen>
<![CDATA[
$ php -l /path/to/code/myfile.inc
No syntax errors detected in /path/to/code/myfile.inc
]]>
- </programlisting>
+ </screen>
+ </para>
</tip>
</refsect1>
<refsect1>
<title>I don't agree with your coding standards! Can I make PHP_CodeSniffer enforce my
own?</title>
<para>
- Yes. At its core, PHP_CodeSniffer is just a framework for enforcing coding standards. We release
PHP_CodeSniffer with the a couple of sample coding standards to help developers get started on
projects where they do not have a standard. If you want to write your own standards, read the
<link linkend="package.php.php-codesniffer.coding-standard-tutorial">tutorial on
creating coding standards</link>.
+ Yes. At its core, PHP_CodeSniffer is just a framework for enforcing coding standards. We release
PHP_CodeSniffer with a couple of sample coding standards to help developers get started on projects
where they do not have a standard. If you want to write your own standards, read the <link
linkend="package.php.php-codesniffer.coding-standard-tutorial">tutorial on creating
coding standards</link>.
</para>
</refsect1>
<refsect1>
<title>How come PHP_CodeSniffer reported errors, I fixed them, now I get even
more?</title>
<para>
- Sometimes, errors mask the existence of other errors, or new errors are created as you fix
others. For example, PHP_CodeSniffer might tell you that an in-line IF statement needs to be defined
with braces. Once you make this change, PHP_CodeSniffer may report that the braces you added are not
correctly aligned.
+ Sometimes, errors mask the existence of other errors, or new errors are created as you fix
others. For example, PHP_CodeSniffer might tell you that an inline IF statement needs to be defined
with braces. Once you make this change, PHP_CodeSniffer may report that the braces you added are not
correctly aligned.
</para>
<para>
Always run PHP_CodeSniffer until you get a passing result. Once you've made the changes
PHP_CodeSniffer recommends, run PHP_CodeSniffer again to ensure no new errors have been added.