Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (5 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/src/wp-admin/includes/class-language-pack-upgrader.php

    r42871 r43571  
    276276
    277277        /** This action is documented in wp-admin/includes/class-wp-upgrader.php */
    278         do_action( 'upgrader_process_complete', $this, array(
    279             'action'       => 'update',
    280             'type'         => 'translation',
    281             'bulk'         => true,
    282             'translations' => $language_updates_results,
    283         ) );
     278        do_action(
     279            'upgrader_process_complete',
     280            $this,
     281            array(
     282                'action'       => 'update',
     283                'type'         => 'translation',
     284                'bulk'         => true,
     285                'translations' => $language_updates_results,
     286            )
     287        );
    284288
    285289        // Re-add upgrade hooks.
     
    338342        if ( ! $mo || ! $po ) {
    339343            return new WP_Error(
    340                 'incompatible_archive_pomo', $this->strings['incompatible_archive'],
     344                'incompatible_archive_pomo',
     345                $this->strings['incompatible_archive'],
    341346                /* translators: 1: .po, 2: .mo */
    342347                sprintf(
Note: See TracChangeset for help on using the changeset viewer.