WordPress.org

Make WordPress Core

Changeset 45665 for trunk/composer.json


Ignore:
Timestamp:
07/19/2019 07:47:16 AM (5 months ago)
Author:
pento
Message:

Coding Standards: Move the remaining PHPCS errors to report as warnings, and add Travis tests.

The remaining error-level coding standards issues (specifically, associated with the sniffs WordPress.PHP.YodaConditions.NotYoda, WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQL.NotPrepared, and WordPress.Files.FileName.InvalidClassFileName) are marked as warnings, until they're all addressed.

This change allows us to run linting on Travis across the entire codebase, ensuring no other error-level violations can be introduced.

Additionally, PHPCS will now cache results locally, drastically improving performance for subsequent checks: scanning the entire codebase takes 1-2 minutes the first time, and less than one second for subsequent checks.

See #47632.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/composer.json

    r45600 r45665  
    1515    },
    1616    "scripts": {
    17         "format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source",
    18         "lint": "phpcs --standard=phpcs.xml.dist --report-summary --report-source"
     17        "format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source --cache -d memory_limit=256M",
     18        "lint": "phpcs --standard=phpcs.xml.dist --report-summary --report-source --cache -d memory_limit=256M",
     19        "lint:errors": "phpcs --standard=phpcs.xml.dist --report-summary --report-source --cache -d memory_limit=256M -n"
    1920    }
    2021}
Note: See TracChangeset for help on using the changeset viewer.