WordPress.org

Make WordPress Core

Ticket #46152: 46152-move-command-line-directives-to-ruleset.diff

File 46152-move-command-line-directives-to-ruleset.diff, 1.9 KB (added by desrosj, 18 months ago)
  • composer.json

     
    1414                "wp-coding-standards/wpcs": "~2.1.0"
    1515        },
    1616        "scripts": {
    17                 "format": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --report=summary,source --cache -d memory_limit=256M",
    18                 "lint": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --report=summary,source --cache -d memory_limit=256M",
     17                "format": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf",
     18                "lint": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs",
    1919                "lint:errors": "@lint -n"
    2020        }
    2121}
  • phpcs.xml.dist

     
    22<ruleset name="WordPress Coding Standards">
    33        <description>Apply WordPress Coding Standards to all Core files</description>
    44
     5        <ini name="memory_limit" value="256M"/>
     6
     7        <arg name="extensions" value="php"/>
     8        <arg name="cache"/>
     9        <arg name="report" value="summary,source"/>
     10
     11        <!-- Strip the filepaths down to the relevant bit. -->
     12        <arg name="basepath" value="./"/>
     13
     14        <!-- Check up to 20 files simultaneously. -->
     15        <arg name="parallel" value="20"/>
     16
     17        <!-- Show sniff codes in all reports -->
     18        <arg value="ps"/>
     19
     20        <file>.</file>
     21
    522        <rule ref="WordPress-Core"/>
    623        <rule ref="WordPress.CodeAnalysis.EmptyStatement"/>
    724
     
    7693                </properties>
    7794        </rule>
    7895
    79         <arg name="extensions" value="php"/>
    80 
    81         <!-- Strip the filepaths down to the relevant bit. -->
    82         <arg name="basepath" value="./"/>
    83 
    84         <!-- Check up to 20 files simultaneously. -->
    85         <arg name="parallel" value="20"/>
    86 
    87         <!-- Show sniff codes in all reports -->
    88         <arg value="ps"/>
    89 
    90         <file>.</file>
    91 
    9296        <!-- Exclude the build folder in the current directory, as Travis puts the checkout in a build directory. -->
    9397        <exclude-pattern type="relative">^build/*</exclude-pattern>
    9498