jscs-dev / gulp-jscs

Check JavaScript code style with jscs
MIT License
312 stars 51 forks source link

JSCS errors getting swallowed somewhere #107

Open robations opened 8 years ago

robations commented 8 years ago

I have a gulp task like this:

gulp.task("jscs", function () {
    gulp.src(["**/*.js"])
        .pipe(plugins.jscs())
        .pipe(plugins.jscs.reporter());
});

Depending on when errors are encountered they do not seem to be reported. For example, if I change the glob pattern to ["zzz/**/*.js", "{aaa,bbb,ccc}/**/*.js"] (in this example only the dir zzz contains errors), suddenly the reporter outputs errors.

It seems like the reporter somehow gets "saturated" with messages so I tried changing the maxErrors config for jscs but this didn't make a difference.

Installed versions:

├─┬ gulp-jscs@3.0.2
│ └─┬ jscs@2.11.0
robations commented 8 years ago

This sounds a little like https://github.com/jscs-dev/gulp-jscs/issues/42

slavede commented 8 years ago

maxErrors config for jscs

Did you change that in your .jscsrc or in gulp call?

robations commented 8 years ago

.jscsrc I think.

slavede commented 8 years ago

Hmm....i had similar issue, but putting maxErros inside .jscsrc fixed it (I was trying to pass it as part of gulp-jscs option before)

robations commented 8 years ago

I couldn't find any joy with it. As a workaround I added an npm build task, eg in package.json:

  "scripts": {
    "jscs": "jscs -v ./"
  }

Also considering eslint as an "extreme workaround" but I've moved onto a different project for the moment.

slavede commented 8 years ago

@hzoo @markelog ...can you close this issue?