Skip to content

Commit 87e2c29

Browse files
gsherwoodjrfnl
authored andcommitted
Updated Advanced Usage (markdown)
1 parent d7fb136 commit 87e2c29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wiki/Advanced-Usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ PHP_CodeSniffer can optionally include one or more custom bootstrap files before
195195
$ phpcs --bootstrap=/path/to/boostrap.1.inc,/path/to/bootstrap.2.inc /path/to/code
196196

197197
## Using a Default Configuration File
198-
If you run PHP_CodeSniffer without specifying a coding standard, PHP_CodeSniffer will look in the current directory, and all parent directories, for a file called either `phpcs.xml` or `phpcs.xml.dist`. If found, configuration information will be read from this file, including the files to check, the coding standard to use, and any command line arguments to apply.
198+
If you run PHP_CodeSniffer without specifying a coding standard, PHP_CodeSniffer will look in the current directory, and all parent directories, for a file called either `.phpcs.xml`, `phpcs.xml`, `.phpcs.xml.dist`, or `phpcs.xml.dist`. If found, configuration information will be read from this file, including the files to check, the coding standard to use, and any command line arguments to apply.
199199

200-
> Note: If both a phpcs.xml and a phpcs.xml.dist file are found, PHP_CodeSniffer will use the phpcs.xml file.
200+
> Note: If multiple default configuration files are found, PHP_CodeSniffer will select one using the following order: `.phpcs.xml`, `phpcs.xml`, `.phpcs.xml.dist`, `phpcs.xml.dist`
201201
202202
The `phpcs.xml` file has exactly the same format as a normal [[ruleset.xml file|Annotated ruleset.xml]], so all the same options are available in it. The `phpcs.xml` file essentially acts as a default coding standard and configuration file for a code base, and is typically used to allow the `phpcs` command to be run on a repository without specifying any arguments.
203203

0 commit comments

Comments
 (0)