Make WordPress Core

Opened 21 months ago

Last modified 3 months ago

#55973 new enhancement

Add .gitattributes file to annotate generated files

Reported by: swissspidy's profile swissspidy Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords:
Focuses: Cc:

Description

To make development on GitHub easier, we could consider adding a .gitattributes file for annotating generated files.

The linguist-generated attribute can be used to mark or unmark paths that should be ignored for the repository's language statistics and hidden by default in diffs.

See https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github for more details

This came to mind when reviewing https://github.com/WordPress/wordpress-develop/pull/2647

Change History (2)

#1 @desrosj
3 months ago

@swissspidy could you give an example of a file you'd want to ignore or hide?

#2 @swissspidy
3 months ago

For example

  • tests/qunit/fixtures/wp-api-generated.js
  • src/wp-includes/blocks/require-dynamic-blocks.php
  • src/wp-includes/blocks/require-static-blocks.php
  • src/js/_enqueues/vendor/codemirror
  • All other block files copied from Gutenberg
Note: See TracTickets for help on using tickets.