Make WordPress Core

Opened 19 months ago

Closed 19 months ago

Last modified 19 months ago

#59527 closed enhancement (fixed)

Include a check for 0-byte files in themes

Reported by: desrosj's profile desrosj Owned by: desrosj's profile desrosj
Milestone: 6.4 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:

Description

The contents of binary files, such as font files or images, are not typically included in patches by default (though using --binary can be used in GIT), but the files are created as 0-byte files. It's not uncommon for a committer to forget or not know this and commit an empty file.

This often happens most often with default themes, and occasionally with unit test related files (see #59526).

Adding a check to the themes workflow would be a good way to confirm this doesn't happen.

Change History (3)

This ticket was mentioned in PR #5374 on WordPress/wordpress-develop by @desrosj.


19 months ago
#1

  • Keywords has-patch added

#2 @desrosj
19 months ago

  • Owner set to desrosj
  • Resolution set to fixed
  • Status changed from new to closed

In 56792:

Build/Test Tools: Check for zero-byte files in themes.

Because the contents of binary files are not included in patches by default, occasionally empty versions of these files are committed on accident. This is the most commonly happens within default themes because they usually contain image and font files.

This adds a job to the theme related GitHub Action workflow that checks for the presence of zero-byte files so that these instances are caught more easily.

Props costdev, hellofromTonya, luminuu, onemaggie.
Fixes #59527.

Note: See TracTickets for help on using tickets.