Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#58170 closed defect (bug) (fixed)

HTML API: Update code style so it passes when backported into Gutenberg

Reported by: dmsnell Owned by: zieladam
Priority: normal Milestone: 6.3
Component: HTML API Version: 6.2
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

​GitHub PR#4360

During the attempted merge of WordPress/gutenberg#49966 the PHP linting rule rejected the PR, even though it's a direct copy from Core.

In this PR we're adding spacing so that we can merge the "blessed" PR without creating conflicts between the two repositories.

Somehow our linting rules aren't aligned and it would be good to fix that, but in order to focus on scope I'd like to get this change in to unblock the backport.

This patch only introduces new whitespace and should not impact code in any way.

Change History (9)

This ticket was mentioned in ​PR #4360 on ​WordPress/wordpress-develop by ​@dmsnell.


4 years ago
#1

Trac ticket #58170-trac

During the attempted merge of WordPress/gutenberg#49966 the PHP linting rule rejected the PR, even though it's a direct copy from Core.

In this PR we're adding spacing so that we can merge the "blessed" PR without creating conflicts between the two repositories.

#2 @zieladam
4 years ago

  • Owner set to zieladam
  • Resolution → fixed
  • Status new → closed

In 55674:

HTML API: Update code style so it passes when backported into Gutenberg.

This changes the indentation of a variable in class-wp-html-tag-processor.php
to satisfy both WordPress and Gutenberg linters.

Props dmsnell, ntsekouras.
Fixes #58170.

​@dmsnell commented on ​PR #4360:


4 years ago
#3

@hellofromtonya this apparently was fine in Core but in Gutenberg it was rejected. I'm not sure why or what happened, as the line in question was called out in review as a surprise that Core's linting didn't catch it. To the best of my recollection I made this change and submitted it only to find the Core linting rejected it, but maybe I messed up when I did that check, because it passes now.

Somewhere in here our linters don't agree, and I figured you might be the person to notify about it.

​@antonvlasenko commented on ​PR #4360:


4 years ago
#5

I wonder how the previous version of that file (before your patch) could possibly pass the Core CI checks? When I test this in my local environment, I get linter errors.

​@dmsnell commented on ​PR #4360:


4 years ago
#6

sounds like a good question @anton-vlasenko 🤷‍♂️

​@peterwilsoncc commented on ​PR #4360:


4 years ago
#7

@anton-vlasenko @dmsnell The linter throws a warning rather than an error.

In WP-Dev, I believe the tests directory action fails on both warnings and errors, but the src directory only fails on errors. I guess the GB repo fails for both warnings and errors too.

#8 @SergeyBiryukov
3 years ago

  • Milestone Awaiting Review → 6.3

#9 @SergeyBiryukov
3 years ago

#58530 was marked as a duplicate.

Note: See TracTickets for help on using tickets.