Skip to:
Content

BuddyPress.org

Changeset 13801


Ignore:
Timestamp:
04/24/2024 01:29:58 AM (20 months ago)
Author:
espellcaste
Message:

Upgrade the WordPress Coding Standards for PHP_CodeSniffer for the latest 3.0 version.

See #7228

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/composer.json

    r13794 r13801  
    3636    },
    3737    "require": {
    38         "composer/installers": "^1.10.0",
    3938        "php": ">=5.6.0"
    4039    },
    4140    "require-dev": {
    42         "buddypress/bp-coding-standards": "0.1.0",
     41        "buddypress/bp-coding-standards": "dev-trunk",
    4342        "yoast/phpunit-polyfills": "^1.0",
    4443        "spatie/phpunit-watcher": "^1.23"
     
    4746        "test": "@php ./vendor/phpunit/phpunit/phpunit",
    4847        "test_multi": "@php ./vendor/phpunit/phpunit/phpunit -c tests/phpunit/multisite.xml",
    49         "phpunit": "@php ./vendor/phpunit/phpunit/phpunit",
    50         "phpcs": "@php ./vendor/bin/phpcs",
     48        "phpunit": "@test",
     49        "phpcs": "@php ./vendor/bin/phpcs . --basepath=.",
     50        "phpcbf": "@php ./vendor/bin/phpcbf . --basepath=.",
    5151        "test:watch": [
    5252            "Composer\\Config::disableProcessTimeout",
  • trunk/phpcs.xml.dist

    r13324 r13801  
    11<?xml version="1.0"?>
    2 <ruleset>
    3     <description>PHP_CodeSniffer standard for the BuddyPress plugin.</description>
     2<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BuddyPress Coding Standards Configuration" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
     3    <description>BuddyPress Coding Standards Configuration.</description>
    44
    55    <!-- Load BuddyPress Coding standards -->
    66    <rule ref="BuddyPress" />
    77
    8     <file>./bp-loader.php</file>
    9     <file>./src/bp-xprofile</file>
     8    <!--
     9    Pass some flags to PHPCS:
     10    p flag: Show progress of the run.
     11    s flag: Show sniff codes in all reports.
     12    v flag: Print processed files.
     13    -->
     14    <arg value="psv" />
    1015
    11     <!-- We are starting with severity of 6. -->
     16    <!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. -->
     17    <arg name="cache" value=".phpcs/cache.json" />
     18
     19    <!-- Check 20 files in parallel. -->
     20    <arg name="parallel" value="20"/>
     21
     22    <!-- Set severity to 6 to see everything that isn't effectively turned off. -->
    1223    <arg name="severity" value="6"/>
    1324
    1425    <!-- What to exclude -->
    1526    <exclude-pattern>*/**/tests/</exclude-pattern>
    16 
    17     <!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. -->
    18     <arg name="cache" value=".phpcs/cache.json" />
    1927</ruleset>
Note: See TracChangeset for help on using the changeset viewer.