Krinkle has uploaded a new change for review.
https://gerrit.wikimedia.org/r/280087
Change subject: build: Actually make lint in 'npm test' fail if failing
......................................................................
build: Actually make lint in 'npm test' fail if failing
Right now the Jenkins job unconditionally marks it as a success
because the lint script doesn't exit with non-zero status code
in case of failure.
I6bd7e34ef7f0 introduced a lint failure, but while the error is
visible in the Jenkins output, it didn't mark it as failure.
This is the minimal patch that uses the built-in 'fail' reporter
to exit non-zero if there were violations (otherwise the reporter
does nothing).
Change-Id: I3d34e0aefb839611090b366945a3f6895c674683
---
M tests/lint.js
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/portals
refs/changes/87/280087/1
diff --git a/tests/lint.js b/tests/lint.js
index 5ee6b69..537990c 100644
--- a/tests/lint.js
+++ b/tests/lint.js
@@ -8,8 +8,10 @@
gulp.src( [ '*.js', devFolder ] )
.pipe( jshint( '.jshintrc' ) )
.pipe( jshint.reporter( 'default' ) )
+ .pipe( jshint.reporter( 'fail' ) )
.pipe( jscs() )
- .pipe( jscs.reporter() );
+ .pipe( jscs.reporter() )
+ .pipe( jscs.reporter( 'fail' ) );
} );
gulp.start( 'lint' );
--
To view, visit https://gerrit.wikimedia.org/r/280087
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d34e0aefb839611090b366945a3f6895c674683
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/portals
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits