for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
module.exports = function( grunt ) {
require( 'load-grunt-tasks' )( grunt );
// Project configuration.
grunt.initConfig( {
// Package
pkg: grunt.file.readJSON( 'package.json' ),
// JSHint
jshint: {
all: [ 'Gruntfile.js', 'composer.json', 'package.json' ]
},
// PHP Code Sniffer
phpcs: {
application: {
src: [
'**/*.php',
'!node_modules/**',
'!vendor/**',
'!wp-content/**'
]
options: {
bin: 'vendor/bin/phpcs',
standard: 'phpcs.xml.dist',
showSniffCodes: true
}
// PHPLint
phplint: {
all: [ 'src/**/*.php' ]
// PHP Mess Detector
phpmd: {
dir: 'src'
bin: 'vendor/bin/phpmd',
exclude: 'node_modules',
reportFormat: 'xml',
rulesets: 'phpmd.xml.dist'
// PHPUnit
phpunit: {
bin: 'vendor/bin/phpunit'
application: {}
} );
// Default task(s).
grunt.registerTask( 'default', [ 'jshint', 'phplint', 'phpmd', 'phpcs' ] );
};