Skip to content

Relax coding standards for test files #44

@srtfisher

Description

@srtfisher

Instead of ignoring test files and allowing code to be written in any format (https://github.com/alleyinteractive/create-wordpress-project/blob/develop/.phpcs.xml#L30) we should relax the standards for tests but still allow them to be reviewed by PHPCS. The suggestion is to adjust the standards to ensure that tests follow the WordPress coding style but aren't subject to the highest standards. This would mean relaxing the more dangerous sniffs such as direct database queries, meta queries, etc.

Acceptance Criteria

  1. Tests can be included in PHPCS configurations and will not be excluded by create-wordpress-project/create-wordpress-plugin.
  2. Tests won't be subject to many sniffs that don't apply to unit tests (direct database calls, meta queries, etc.).
  3. Tests are written in this repository to enforce this.

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