1 | module.exports = function( grunt ) { |
||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
2 | require( 'load-grunt-tasks' )( grunt ); |
||
3 | |||
4 | // Project configuration. |
||
5 | grunt.initConfig( { |
||
6 | // Package |
||
0 ignored issues
–
show
|
|||
7 | pkg: grunt.file.readJSON( 'package.json' ), |
||
8 | |||
9 | // JSHint |
||
0 ignored issues
–
show
|
|||
10 | jshint: { |
||
11 | all: [ 'Gruntfile.js', 'composer.json', 'package.json' ] |
||
12 | }, |
||
13 | |||
14 | // PHP Code Sniffer |
||
0 ignored issues
–
show
|
|||
15 | phpcs: { |
||
16 | application: { |
||
17 | src: [ |
||
18 | '**/*.php', |
||
19 | '!node_modules/**', |
||
20 | '!vendor/**', |
||
21 | '!wp-content/**' |
||
22 | ] |
||
23 | }, |
||
24 | options: { |
||
25 | bin: 'vendor/bin/phpcs', |
||
26 | standard: 'phpcs.xml.dist', |
||
27 | showSniffCodes: true |
||
28 | } |
||
29 | }, |
||
30 | |||
31 | // PHPLint |
||
0 ignored issues
–
show
|
|||
32 | phplint: { |
||
33 | all: [ 'src/**/*.php' ] |
||
34 | }, |
||
35 | |||
36 | // PHP Mess Detector |
||
0 ignored issues
–
show
|
|||
37 | phpmd: { |
||
38 | application: { |
||
39 | dir: 'src' |
||
40 | }, |
||
41 | options: { |
||
42 | bin: 'vendor/bin/phpmd', |
||
43 | exclude: 'node_modules', |
||
44 | reportFormat: 'xml', |
||
45 | rulesets: 'phpmd.xml.dist' |
||
46 | } |
||
47 | }, |
||
48 | |||
49 | // PHPUnit |
||
0 ignored issues
–
show
|
|||
50 | phpunit: { |
||
51 | options: { |
||
52 | bin: 'vendor/bin/phpunit' |
||
53 | }, |
||
54 | application: {} |
||
55 | } |
||
56 | } ); |
||
57 | |||
58 | // Default task(s). |
||
59 | grunt.registerTask( 'default', [ 'jshint', 'phplint', 'phpmd', 'phpcs' ] ); |
||
60 | }; |
||
61 |