Skip to content

Issue: Add .distignore and .gitignore to Plugin Check’s ignored files list #1123

@davidperezgar

Description

@davidperezgar

Description

Currently, the Plugin Check tool does not ignore .distignore and .gitignore files when performing repository file checks.
To improve compatibility with typical WordPress plugin development workflows, these files should be added to the ignored file types list, similar to how other non–production environment files are handled.

Reference:
Plugin_Repo/File_Type_Check.php — specifically the section around:

$is_error = ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) && 'production' === wp_get_environment_type();

Expected Behavior

  • .distignore and .gitignore should be recognized as files safe to ignore.
  • These files should not trigger warnings or errors during the repo file type check.
  • They should be categorized as valid development-only files and excluded from production environment checks.

Suggested Implementation

  • Update the $allowed_dev_files or equivalent array/list to include:
    • .distignore
    • .gitignore

Rationale

These files are widely used in plugin development workflows and are not intended to be included in production plugin packages. Adding them to the ignore list ensures more accurate and developer-friendly validations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions