Permalink
Browse files

globbing support

  • Loading branch information...
1 parent 1a80b2d commit 5723a8027c3faf19d1ac24e2b941f2e57f84019d @ErikAndreas ErikAndreas committed Feb 4, 2014
Showing with 5 additions and 5 deletions.
  1. +1 −1 Gruntfile.js
  2. +4 −4 tasks/lib/phpcs.js
View
2 Gruntfile.js
@@ -25,7 +25,7 @@ module.exports = function(grunt) {
phpcs: {
application: {
- dir: 'php/modules'
+ dir: ['php/**']
},
options: {
bin: 'vendor/bin/phpcs',
View
8 tasks/lib/phpcs.js
@@ -105,19 +105,19 @@ exports.init = function(grunt) {
*/
exports.setup = function(runner) {
- var dir = path.normalize(runner.data.dir),
+ var dir = runner.data.dir,
attr;
config = runner.options(defaults);
for (attr in cliOptions) {
- if (cliOptions[attr] !== undefined) {
+ if (cliOptions[attr] !== undefined) {
config[attr] = cliOptions[attr];
}
}
- cmd = buildCommand(dir) + ' ' + dir;
+ cmd = buildCommand(dir) + ' ' + grunt.file.expand(dir).join(' ');
- grunt.log.writeln('Starting phpcs (target: ' + runner.target.cyan + ') in ' + dir.cyan);
+ grunt.log.writeln('Starting phpcs (target: ' + runner.target.cyan + ') in ' + dir.join(' ').cyan);
grunt.verbose.writeln('Exec: ' + cmd);
done = runner.async();

0 comments on commit 5723a80

Please sign in to comment.