Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
19
rated 0 times [  26] [ 7]  / answers: 1 / hits: 22179  / 11 Years ago, mon, february 10, 2014, 12:00:00

I'm using Gulp in my small project in order to run tests and lint my code. When any of those tasks fail, Gulp always exits with return code 0. If I run jshint by hand, it exits with non-zero code as it should.



Here's my very simple gulpfile.



Do I need to somehow explicitly tell Gulp to return a meaningful value? Is this Gulp's fault, or maybe the gulp-jshint and gulp-jasmine plugins are to blame?


More From » gulp

 Answers
31

A fix has been introduced in this commit.



It works something like this:



gulp.src(src/**/*.js)
.pipe(jshint())
.pipe(jshint.reporter(default))
.pipe(jshint.reporter(fail));


I have been using it on circleci and it works a treat!


[#72603] Sunday, February 9, 2014, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cruzs

Total Points: 710
Total Questions: 113
Total Answers: 100

Location: Nepal
Member since Sat, Jul 18, 2020
4 Years ago
cruzs questions
Thu, Nov 26, 20, 00:00, 4 Years ago
Wed, Oct 28, 20, 00:00, 4 Years ago
Wed, Aug 19, 20, 00:00, 4 Years ago
Sun, Aug 2, 20, 00:00, 4 Years ago
;