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.


Built from https://develop.svn.wordpress.org/trunk@43571


git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2018-08-17 01:51:36 +00:00
parent d3dee15477
commit f7d8a35517
15 changed files with 77 additions and 72 deletions

View File

@ -31,7 +31,8 @@ if ( post_password_required() ) {
<?php
printf(
_n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentytwelve' ),
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>'
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
);
?>
</h2>

View File

@ -69,7 +69,8 @@ function twentytwelve_setup() {
* and here we also set up the default background color.
*/
add_theme_support(
'custom-background', array(
'custom-background',
array(
'default-color' => 'e6e6e6',
)
);
@ -395,7 +396,8 @@ if ( ! function_exists( 'twentytwelve_comment' ) ) :
<?php
comment_reply_link(
array_merge(
$args, array(
$args,
array(
'reply_text' => __( 'Reply', 'twentytwelve' ),
'after' => ' <span>&darr;</span>',
'depth' => $depth,
@ -551,14 +553,16 @@ function twentytwelve_customize_register( $wp_customize ) {
if ( isset( $wp_customize->selective_refresh ) ) {
$wp_customize->selective_refresh->add_partial(
'blogname', array(
'blogname',
array(
'selector' => '.site-title > a',
'container_inclusive' => false,
'render_callback' => 'twentytwelve_customize_partial_blogname',
)
);
$wp_customize->selective_refresh->add_partial(
'blogdescription', array(
'blogdescription',
array(
'selector' => '.site-description',
'container_inclusive' => false,
'render_callback' => 'twentytwelve_customize_partial_blogdescription',