Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (6 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/tests/phpunit/tests/widgets/media-video-widget.php

    r42343 r43571  
    7676                'no_media_selected',
    7777                'add_media',
    78             ), array_keys( $widget->l10n )
     78            ),
     79            array_keys( $widget->l10n )
    7980        );
    8081    }
     
    100101            array(
    101102                'attachment_id' => 'media',
    102             ), $instance
     103            ),
     104            $instance
    103105        );
    104106        $this->assertSame( $result, $instance );
     
    115117            array(
    116118                'url' => 'not_a_url',
    117             ), $instance
     119            ),
     120            $instance
    118121        );
    119122        $this->assertNotSame( $result, $instance );
     
    131134            array(
    132135                'loop' => 'not-boolean',
    133             ), $instance
     136            ),
     137            $instance
    134138        );
    135139        $this->assertSame( $result, $instance );
     
    146150            array(
    147151                'title' => '<h1>Cute Baby Goats</h1>',
    148             ), $instance
     152            ),
     153            $instance
    149154        );
    150155        $this->assertNotSame( $result, $instance );
     
    161166            array(
    162167                'preload' => 'nope',
    163             ), $instance
     168            ),
     169            $instance
    164170        );
    165171        $this->assertSame( $result, $instance );
     
    169175            array(
    170176                'h4x' => 'value',
    171             ), $instance
     177            ),
     178            $instance
    172179        );
    173180        $this->assertSame( $result, $instance );
Note: See TracChangeset for help on using the changeset viewer.