From 5c2e8901ee13a12595c2f7fb58b67088b5c82071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Becheras?= Date: Wed, 4 Jan 2017 10:21:34 +0100 Subject: [PATCH 1/6] update the travis script adding the lint script and removing the test script because its contained in the coverage script --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4912188..73d4d90 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,5 +6,5 @@ before_script: - npm install -g gulp-cli - npm install -g jscover script: - - npm test + - npm run lint - npm run coverage From adae3fe99c784d72e28e69f7587d9eabc7da36fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Becheras?= Date: Wed, 4 Jan 2017 10:22:25 +0100 Subject: [PATCH 2/6] break on lint errors if the --breakOnError CLI option is passed --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 345881a..4bca495 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -20,7 +20,7 @@ gulp.task('lint', function () { return gulp.src(['./gulpfile.js', './lib/**/*.js', './tests/**/*.spec.js']) .pipe(linter()) .pipe(linter.reporter('default', { - breakOnError: false + breakOnError: argv.breakOnError })) }) From 711ef60126caae9df9089702be089e422fef68b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Becheras?= Date: Wed, 4 Jan 2017 10:23:32 +0100 Subject: [PATCH 3/6] add the lint npm script to lint with break-on-error --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index eebe6bd..283f9fb 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "test": "gulp test", "TDD": "gulp test 2> /dev/null; gulp watch", + "lint": "gulp lint --breakOnError", "coverage": "gulp coverage" }, "repository": { From c78840133915de31400b66a90b7cfff544ecc124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Becheras?= Date: Wed, 4 Jan 2017 10:25:10 +0100 Subject: [PATCH 4/6] this commit should not pass the travis build --- lib/ConnectSequence.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ConnectSequence.js b/lib/ConnectSequence.js index 8823582..aa5de18 100644 --- a/lib/ConnectSequence.js +++ b/lib/ConnectSequence.js @@ -128,7 +128,7 @@ function appendList (middlewares) { errorMsg += typeof middlewares + ' given.' throw new TypeError(errorMsg) } - return this.append.apply(this, middlewares) + return this.append.apply(this, middlewares); } /** From 43a983cb2ce9b7a3ae7d3ee9359e9ee6ca9b164c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Becheras?= Date: Wed, 4 Jan 2017 10:34:42 +0100 Subject: [PATCH 5/6] run coverage in travis build only if lint didn't failed. Build should fails here too. --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 73d4d90..d0aa2fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,5 +6,4 @@ before_script: - npm install -g gulp-cli - npm install -g jscover script: - - npm run lint - - npm run coverage + - npm run lint && npm run coverage From 06b634a6dba876ce0cd582405c7a997ee4224e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Becheras?= Date: Wed, 4 Jan 2017 10:38:28 +0100 Subject: [PATCH 6/6] fixing the lint error. Travis build should pass now. --- lib/ConnectSequence.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ConnectSequence.js b/lib/ConnectSequence.js index aa5de18..8823582 100644 --- a/lib/ConnectSequence.js +++ b/lib/ConnectSequence.js @@ -128,7 +128,7 @@ function appendList (middlewares) { errorMsg += typeof middlewares + ' given.' throw new TypeError(errorMsg) } - return this.append.apply(this, middlewares); + return this.append.apply(this, middlewares) } /**