Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax coding standards for test files #44

Open
srtfisher opened this issue Aug 7, 2024 · 0 comments
Open

Relax coding standards for test files #44

srtfisher opened this issue Aug 7, 2024 · 0 comments
Assignees

Comments

@srtfisher
Copy link
Member

srtfisher commented Aug 7, 2024

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.
@srtfisher srtfisher self-assigned this Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant