WordPress.org

Make WordPress Core

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

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

     
    1717                "wp-coding-standards/wpcs": "~2.1.0"
    1818        },
    1919        "scripts": {
    20                 "format": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --report=summary,source --cache -d memory_limit=256M",
    21                 "lint": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --report=summary,source --cache -d memory_limit=256M",
     20                "format": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --report=summary,source",
     21                "lint": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --report=summary,source",
    2222                "lint:errors": "@lint -n"
    2323        }
    2424}
  • 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        <!-- Strip the filepaths down to the relevant bit. -->
     10        <arg name="basepath" value="./"/>
     11
     12        <!-- Check up to 20 files simultaneously. -->
     13        <arg name="parallel" value="20"/>
     14
     15        <!-- Show sniff codes in all reports -->
     16        <arg value="ps"/>
     17
     18        <file>.</file>
     19
    520        <rule ref="WordPress-Core"/>
    621        <rule ref="WordPress.CodeAnalysis.EmptyStatement"/>
    722
     
    7691                </properties>
    7792        </rule>
    7893
    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 
    9294        <!-- Exclude the build folder in the current directory, as Travis puts the checkout in a build directory. -->
    9395        <exclude-pattern type="relative">^build/*</exclude-pattern>
    9496