diff --git a/.github/workflows/basics.yml b/.github/workflows/basics.yml index 30877ebf..dc0e0006 100644 --- a/.github/workflows/basics.yml +++ b/.github/workflows/basics.yml @@ -57,3 +57,9 @@ jobs: - name: Show PHPCS results in PR run: cs2pr ./phpcs-report.xml + + # Check that the sniffs available are feature complete. + # For now, just check that all sniffs have unit tests. + # At a later stage the documentation check can be activated. + - name: Check sniff feature completeness + run: composer check-complete diff --git a/composer.json b/composer.json index cd0606cd..a1d7f0be 100644 --- a/composer.json +++ b/composer.json @@ -25,6 +25,7 @@ "php-parallel-lint/php-parallel-lint": "^1.0", "php-parallel-lint/php-console-highlighter": "^0.5", "phpcompatibility/php-compatibility": "^9", + "phpcsstandards/phpcsdevtools": "^1.0", "phpunit/phpunit": "^4 || ^5 || ^6 || ^7" }, "scripts": { @@ -37,11 +38,15 @@ "phpcs": "bin/phpcs", "phpunit": "bin/unit-tests", "coverage": "bin/unit-tests-coverage", + "check-complete": [ + "@php ./vendor/phpcsstandards/phpcsdevtools/bin/phpcs-check-feature-completeness -q ./WordPressVIPMinimum" + ], "test": [ "@lint", "@ruleset", "@phpunit", - "@phpcs" + "@phpcs", + "@check-complete" ] }, "support": {