jscs-dev/gulp-jscs — pull request #41 by KhodeN (2014-10-25 07:13:49+00:00)
Title: Support custom reporters (and reporters from jscs)

My English is very bad, so I will explain by code

This pull request add ability to define custom reporters in those manners:

### Reporter from custom file (own reporter)
```javascript
gulp.task('jscs:storm', function() {
var jscs = require('gulp-jscs');
var config = {...};
return gulp.src(...)
.pipe(jscs(config, 'myReporter.js'));
});
```

### Standart reporter (from jscs: `text, junit, inlinesingle, inline, console, checkstyle`)
```javascript
gulp.task('jscs:storm', function() {
var jscs = require('gulp-jscs');
var config = {...};
return gulp.src(...)
.pipe(jscs(config, 'checkstyle'));
});
```

### Custom function for reporter
```javascript
function myReporter (errorCollection) {
errorCollection.forEach(function(errors) {
errors.getErrorList().forEach(function(err) {
console.log(errors.filePath + ':' + err.line + ' (col ' + err.column + '), ' + err.message);
});
});
}

gulp.task('jscs:storm', function() {
var jscs = require('gulp-jscs');
var config = {...};
return gulp.src(...)
.pipe(jscs(config, myReporter));
});
```
The reporter above useful for run in task form webstorm. Supports quick navigation from console by clicking on filename.

### Without reporter works as usual
```javascript
gulp.task('jscs:storm', function() {
var jscs = require('gulp-jscs');
var config = {...};
return gulp.src(...)
.pipe(jscs(config));
});
```

_Also added field `filePath` to every item in `errorCollection` for getting absolute path of file._