WordPress.org

Make WordPress Core

Changeset 43571 for trunk/phpcs.xml.dist


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (3 years ago)
Author:
pento
Message:

Coding Standards: Upgrade WPCS to 1.0.0

WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:

  • Multiline function calls must now put each parameter on a new line.
  • Auto-formatting files is now part of the grunt precommit script.
  • Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpcs.xml.dist

    r43348 r43571  
    55    <rule ref="WordPress-Core"/>
    66    <rule ref="WordPress.CodeAnalysis.EmptyStatement"/>
     7
     8    <rule ref="PEAR.Functions.FunctionCallSignature">
     9        <properties>
     10            <property name="allowMultipleArguments" value="false"/>
     11        </properties>
     12    </rule>
    713
    814    <arg name="extensions" value="php"/>
     
    1925    <file>.</file>
    2026
     27    <!-- Exclude the build folder in the current directory, as Travis puts the checkout in a build directory. -->
     28    <exclude-pattern type="relative">^build/*</exclude-pattern>
     29
    2130    <!-- Directories and third party library exclusions -->
    22     <exclude-pattern>/build/*</exclude-pattern>
    2331    <exclude-pattern>/node_modules/*</exclude-pattern>
    2432    <exclude-pattern>/vendor/*</exclude-pattern>
     
    8896    </rule>
    8997
     98    <rule ref="Generic.Files.LineEndings">
     99        <exclude-pattern>/wp-config\.php</exclude-pattern>
     100        <exclude-pattern>/wp-config-sample\.php</exclude-pattern>
     101    </rule>
     102
    90103    <!-- Whitelist test classes for select sniffs. -->
    91104    <rule ref="WordPress.Files.FileName">
Note: See TracChangeset for help on using the changeset viewer.