Skip to content

Commit ae995b5

Browse files
committed
Renamed the default ruleset file to phpcs.xml in case we ever support different standards per directory (would break checking inside other coding standards)
1 parent 05f07f5 commit ae995b5

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

CodeSniffer/CLI.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ public function validateStandard($standards)
998998
// They did not supply a standard to use.
999999
// Looks for a ruleset in the current directory.
10001000
if (empty($this->values['files']) === true) {
1001-
$default = getcwd().DIRECTORY_SEPARATOR.'ruleset.xml';
1001+
$default = getcwd().DIRECTORY_SEPARATOR.'phpcs.xml';
10021002
if (is_file($default) === true) {
10031003
return array($default);
10041004
}

package.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ http://pear.php.net/dtd/package-2.0.xsd">
3434
-- Use the --report-width=auto command line argument to auto-size the reports
3535
-- Use the command "phpcs --config-set report_width auto" to use auto-sizing by default
3636
- Reports will now size to fit inside the report width setting instead of always using padding to fill the space
37-
- If no files or standards are specified, PHPCS will now look for a ruleset.xml file in the current directory
37+
- If no files or standards are specified, PHPCS will now look for a phpcs.xml file in the current directory
3838
-- This file has the same format as a standard ruleset.xml file
39-
-- The ruleset.xml file should specify (at least) files to process and a standard/sniffs to use
39+
-- The phpcs.xml file should specify (at least) files to process and a standard/sniffs to use
4040
-- Useful for running the phpcs and phpcbf commands without any arguments at the top of a repository
4141
- Default file paths can now be specified in a ruleset.xml file using the "file" tag
4242
-- File paths are only processed if no files were specified on the command line

ruleset.xml renamed to phpcs.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
<file>CodeSniffer.php</file>
66
<file>CodeSniffer</file>
7+
<file>scripts</file>
8+
9+
<exclude-pattern>*/Tests/*</exclude-pattern>
710

811
<arg name="report" value="summary"/>
912
<arg value="np"/>

0 commit comments

Comments
 (0)