Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 879 Bytes

File metadata and controls

56 lines (35 loc) · 879 Bytes

Contributing to Taxonomist

Prerequisites

Setup

composer install

This installs WordPress Coding Standards (WPCS) for PHP linting.

Running Tests

Python tests

The helper functions and WordPress.com adapter are covered by a unittest suite in tests/:

python3 -m unittest discover tests

Bug fixes must include a regression test in tests/.

Linting

PHP (WPCS)

Lint all PHP files in lib/:

./vendor/bin/phpcs

Auto-fix what can be fixed automatically:

./vendor/bin/phpcbf

The ruleset is defined in .phpcs.xml.dist.

Before You Commit

Run both checks:

./vendor/bin/phpcs
python3 -m unittest discover tests

Both must pass before submitting a pull request.