Skip to content

Commit c0d9efc

Browse files
authored
Merge pull request #259 from wpengine/ryanmeier/remove-grunt-phpcs
[PI-3451] Replace grunt-phpcs with phpcs composer command.
2 parents d5fb08b + a474397 commit c0d9efc

File tree

5 files changed

+11
-20
lines changed

5 files changed

+11
-20
lines changed

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ matrix:
2929
- php: 7.3
3030
env: WP_VERSION=5.2 WP_MULTISITE=1
3131
- php: 7.3
32-
env: WP_VERSION=latest WP_MULTISITE=1
32+
env:
33+
env: WP_VERSION=latest WP_MULTISITE=1 PHPCS=1
34+
- PHPCS=1
3335
- php: 7.3
3436
env: NPM_TESTS=1
3537
exclude:
@@ -87,6 +89,10 @@ before_script:
8789
fi
8890
script:
8991
- |
92+
if [[ "$PHPCS" == "1" ]]; then
93+
composer phpcs
94+
fi
95+
9096
if [[ "$NPM_TESTS" == "1" ]]; then
9197
npm test
9298
else

Gruntfile.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,13 @@ module.exports = function(grunt) {
2020
},
2121
phplint: {
2222
plugin: phpPaths
23-
},
24-
phpcs: {
25-
plugin: {
26-
src: phpPaths
27-
},
28-
options: {
29-
bin: 'vendor/bin/phpcs',
30-
standard: 'src/ruleset-wordpress.xml'
31-
}
3223
}
3324
});
3425

3526
grunt.loadNpmTasks('grunt-wp-readme-to-markdown');
3627
grunt.loadNpmTasks('grunt-phplint');
37-
grunt.loadNpmTasks('grunt-phpcs');
3828

39-
grunt.registerTask('default', ['phplint', 'phpcs']);
29+
grunt.registerTask('default', ['phplint']);
4030

4131
grunt.registerTask('readme', ['wp_readme_to_markdown']);
4232
};

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
],
2121
"post-install-cmd": [
2222
"cd php52; composer install; cd .."
23-
]
23+
],
24+
"phpcs": "phpcs --standard=src/ruleset-wordpress.xml wpengine-phpcompat.php load-files.php src/*.php",
25+
"phpcs:fix": "phpcbf --standard=src/ruleset-wordpress.xml wpengine-phpcompat.php load-files.php src/*.php"
2426
}
2527
}

package-lock.json

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"devDependencies": {
44
"grunt": "^0.4.5",
55
"grunt-cli": "^1.2.0",
6-
"grunt-phpcs": "^0.4.0",
76
"grunt-phplint": "0.0.8",
87
"grunt-wp-readme-to-markdown": "^2.0.0",
98
"lodash": "4.17.13",

0 commit comments

Comments
 (0)