diff --git a/Gruntfile.js b/Gruntfile.js index ac1213ed71..e126588b10 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -2,6 +2,7 @@ module.exports = function( grunt ) { 'use strict'; var banner = '/**\n * <%= pkg.homepage %>\n * Copyright (c) <%= grunt.template.today("yyyy") %>\n * This file is generated automatically. Do not edit.\n */\n'; + require('phplint').gruntPlugin(grunt); // Project configuration grunt.initConfig( { @@ -17,6 +18,15 @@ module.exports = function( grunt ) { } }, + phplint: { + options: { + limit: 10, + stdout: true, + stderr: true + }, + files: ['lib/**/*.php', 'tests/*.php', '*.php'] + }, + } ); grunt.loadNpmTasks( 'grunt-phpcs' ); diff --git a/bin/phpcs.sh b/bin/phpcs.sh index d9a223734c..8e8a7f0110 100755 --- a/bin/phpcs.sh +++ b/bin/phpcs.sh @@ -6,3 +6,4 @@ fi composer install grunt phpcs +grunt phplint diff --git a/package.json b/package.json index 81d069d4c0..010866eb19 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "author": "WP-API Team ", "devDependencies": { "grunt": "^0.4.5", - "grunt-phpcs": "^0.4.0" + "grunt-phpcs": "^0.4.0", + "phplint": "^1.2.0" } }