Make WordPress Core

Opened 17 months ago

Closed 17 months ago

Last modified 14 months ago

#58170 closed defect (bug) (fixed)

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

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

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.


17 months 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
17 months ago

  • Owner set to zieladam
  • Resolution set to fixed
  • Status changed from new to 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:


17 months 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:


17 months 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:


17 months ago
#6

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

@peterwilsoncc commented on PR #4360:


17 months 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
14 months ago

  • Milestone changed from Awaiting Review to 6.3

#9 @SergeyBiryukov
14 months ago

#58530 was marked as a duplicate.

Note: See TracTickets for help on using tickets.