Skip to content

Commit 0cda979

Browse files
authored
Merge pull request #2377 from WordPress/feature/2375-ghactions-test-sample-ruleset
2 parents c961efc + d7d4de3 commit 0cda979

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.github/workflows/basic-qa.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ jobs:
141141
- name: Test the WordPress ruleset
142142
run: $(pwd)/vendor/bin/phpcs -ps ./Tests/RulesetCheck/class-ruleset-test.inc --standard=WordPress
143143

144+
- name: Rename the example ruleset to one which can be used for a ruleset
145+
run: cp phpcs.xml.dist.sample sample.xml
146+
147+
- name: Test the example ruleset
148+
run: $(pwd)/vendor/bin/phpcs -ps ./Tests/RulesetCheck/example-ruleset-test.inc --standard=./sample.xml
149+
144150
# Test for fixer conflicts by running the auto-fixers of the complete WPCS over the test case files.
145151
# This is not an exhaustive test, but should give an early indication for typical fixer conflicts.
146152
# If only fixable errors are found, the exit code will be 1, which can be interpreted as success.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
/**
3+
* File which should not yield any errors when using the example ruleset.
4+
*
5+
* @package My\Prefix\Package
6+
*/
7+
8+
$my_prefix_var = 'hello';

0 commit comments

Comments
 (0)