Skip to content

Commit 7b8da74

Browse files
authored
Merge pull request #260 from wpengine/ryanmeier/remove-grunt-phplint
[PI-3452] Replace grunt-phplint with php lint script.
2 parents c0d9efc + 865d7c5 commit 7b8da74

File tree

7 files changed

+21
-71
lines changed

7 files changed

+21
-71
lines changed

.phplint.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
path: ./
2+
jobs: 10
3+
cache: build/phplint.cache
4+
extensions:
5+
- php
6+
exclude:
7+
- vendor

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ matrix:
2929
- php: 7.3
3030
env: WP_VERSION=5.2 WP_MULTISITE=1
3131
- php: 7.3
32-
env:
33-
env: WP_VERSION=latest WP_MULTISITE=1 PHPCS=1
34-
- PHPCS=1
32+
env: WP_VERSION=latest WP_MULTISITE=1 PHPCS=1
3533
- php: 7.3
3634
env: NPM_TESTS=1
3735
exclude:
@@ -91,6 +89,7 @@ script:
9189
- |
9290
if [[ "$PHPCS" == "1" ]]; then
9391
composer phpcs
92+
bash php-lint.sh
9493
fi
9594
9695
if [[ "$NPM_TESTS" == "1" ]]; then

Gruntfile.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
var phpPaths = [
2-
'wpengine-phpcompat.php',
3-
'load-files.php',
4-
'src/*.php',
5-
];
6-
71
module.exports = function(grunt) {
8-
92
grunt.initConfig({
103
wp_readme_to_markdown: {
114
options: {
@@ -17,17 +10,12 @@ module.exports = function(grunt) {
1710
'readme.md': 'readme.txt'
1811
},
1912
},
20-
},
21-
phplint: {
22-
plugin: phpPaths
2313
}
2414
});
2515

2616
grunt.loadNpmTasks('grunt-wp-readme-to-markdown');
27-
grunt.loadNpmTasks('grunt-phplint');
28-
29-
grunt.registerTask('default', ['phplint']);
3017

18+
grunt.registerTask('default', []);
3119
grunt.registerTask('readme', ['wp_readme_to_markdown']);
3220
};
3321

composer.lock

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

package-lock.json

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

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33
"devDependencies": {
44
"grunt": "^0.4.5",
55
"grunt-cli": "^1.2.0",
6-
"grunt-phplint": "0.0.8",
76
"grunt-wp-readme-to-markdown": "^2.0.0",
87
"lodash": "4.17.13",
98
"minimatch": "3.0.2",
109
"node-qunit-phantomjs": "^1.4.0"
1110
},
1211
"scripts": {
13-
"test": "npm run test:lint && npm run test:qunit",
12+
"test": "npm run test:qunit",
1413
"test:qunit": "node-qunit-phantomjs tests/qunit/index.html --verbose",
15-
"test:lint": "grunt",
1614
"readme": "grunt readme"
1715
}
1816
}

php-lint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
find . -not \( -path ./vendor -prune \) -not \( -path ./php52 -prune \) -type f -name '*.php' -print0 | xargs -0 -n1 -P4 -I {} php -l -n {} | (! grep -v "No syntax errors detected" )

0 commit comments

Comments
 (0)