WordPress.org

Make WordPress Core

Opened 2 months ago

Closed 4 weeks ago

#50744 closed task (blessed) (maybelater)

Add the WordPress-Docs standard to the PHPCS configuration

Reported by: johnbillion Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.1
Component: Build/Test Tools Keywords: has-patch ongoing
Focuses: docs, coding-standards Cc:

Description

There was discussion in #41057 about including the WordPress-Docs standard in the core PHPCS configuration, but it was decided against because of the high number of errors and because of the low number of these that can be automatically fixed.

Let's take another look and re-assess whether we can work toward introducing this standard into core's linting.

Change History (6)

This ticket was mentioned in PR #428 on WordPress/wordpress-develop by johnbillion.


2 months ago

  • Keywords has-patch added

Trac ticket: https://core.trac.wordpress.org/ticket/50744

The non-linting tests have only been removed to speed up CI for this change.

#2 @johnbillion
2 months ago

In 48586:

Docs: First pass at some inline docs fixes mostly made by PHPCBF.

See #49572, #50744

#3 @johnbillion
2 months ago

In 48590:

Docs: Another pass at some inline docs fixes mostly made by PHPCBF.

See #49572, #50744

#4 @jrf
2 months ago

@johnbillion I applaud the effort, thanks for taking this initiative.

I'd like to suggest holding off on adding the ruleset to the .phpcs.xml.dist file at the moment.

The current WordPress-Docs standard is far from complete, nor completely accurate and quite some work is needed to actually properly check the docs against the documentation standards as outlined in the handbook.

Once the currently ongoing work for WPCS 3.0.0 is finished, improving the docs sniffs, or rather, writing new sniffs to allow us to check the docs properly is on the agenda, though it still be a while before I get to this.

In the mean time, fixes to the existing docs, like the ones above, are of course encouraged, awesome and very welcome.

#5 @johnbillion
2 months ago

  • Keywords ongoing added
  • Milestone changed from Awaiting Review to Future Release

Yeah I realised quite quickly that the WordPress-Docs ruleset isn't as mature or feature complete as the main ruleset, but it helps get us started with low hanging fruit at least.

I'll keep working on this in core while using the pull request to track outstanding issues. This will probably be a slow-burner.

#6 @johnbillion
4 weeks ago

  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from new to closed

I'm going to close this off as the sniff isn't really mature enough at the moment. We can take another look at this in the future.

Note: See TracTickets for help on using tickets.