Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (8 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-audio-widget.php

    r42343 r43571  
    7575                                'add_media',
    7676                                'unsupported_file_type',
    77                         ), array_keys( $widget->l10n )
     77                        ),
     78                        array_keys( $widget->l10n )
    7879                );
    7980        }
    … …  
    99100                        array(
    100101                                'attachment_id' => 'media',
    101                         ), $instance
     102                        ),
     103                        $instance
    102104                );
    103105                $this->assertSame( $result, $instance );
    … …  
    114116                        array(
    115117                                'url' => 'not_a_url',
    116                         ), $instance
     118                        ),
     119                        $instance
    117120                );
    118121                $this->assertNotSame( $result, $instance );
    … …  
    130133                        array(
    131134                                'loop' => 'not-boolean',
    132                         ), $instance
     135                        ),
     136                        $instance
    133137                );
    134138                $this->assertSame( $result, $instance );
    … …  
    145149                        array(
    146150                                'title' => '<h1>Cute Baby Goats</h1>',
    147                         ), $instance
     151                        ),
     152                        $instance
    148153                );
    149154                $this->assertNotSame( $result, $instance );
    … …  
    160165                        array(
    161166                                'preload' => 'nope',
    162                         ), $instance
     167                        ),
     168                        $instance
    163169                );
    164170                $this->assertSame( $result, $instance );
    … …  
    168174                        array(
    169175                                'h4x' => 'value',
    170                         ), $instance
     176                        ),
     177                        $instance
    171178                );
    172179                $this->assertSame( $result, $instance );
Note: See TracChangeset for help on using the changeset viewer.