grunt-phpcs
Advanced tools
Comparing version
@@ -19,3 +19,3 @@ { | ||
}], | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"main": "Gruntfile.js", | ||
@@ -22,0 +22,0 @@ "engines": { |
@@ -36,3 +36,3 @@ # grunt-phpcs | ||
application: { | ||
dir: ['application/classes/*.php', application/lib/**/*.php] | ||
dir: ['application/classes/*.php', 'application/lib/**/*.php'] | ||
}, | ||
@@ -107,1 +107,7 @@ options: { | ||
Log report to the file. This option can also be set by running the task with `--report-file`. | ||
####tabWidth | ||
Type: `Integer` Default: `false` | ||
Automatically convert tabs to the specified number of | ||
spaces when sniffing. This option can also be set by running the task with `--tab-width`. |
@@ -28,3 +28,4 @@ /* | ||
maxBuffer: 200*1024, | ||
ignoreExitCode: false | ||
ignoreExitCode: false, | ||
tabWidth: false | ||
}, | ||
@@ -40,3 +41,4 @@ cliOptions = { | ||
warningSeverity: grunt.option('warning-severity'), | ||
verbose: grunt.option('verbose') | ||
verbose: grunt.option('verbose'), | ||
tabWidth: grunt.option('tab-width') | ||
}, | ||
@@ -100,2 +102,13 @@ cmd = null, | ||
} | ||
if (config.showSniffCodes === true) { | ||
// Show sniff codes in all reports | ||
cmd += ' -s'; | ||
} | ||
if (config.tabWidth) { | ||
// Convert tabs to the specified number of spaces when sniffing | ||
cmd += ' --tab-width=' + config.tabWidth; | ||
} | ||
return cmd; | ||
@@ -102,0 +115,0 @@ }; |
11882
5.09%200
5.26%112
5.66%