From 2ba8e4e73f54d804522723e15b756fa3e98bd78b Mon Sep 17 00:00:00 2001 From: Zac Echola Date: Mon, 28 Jul 2014 09:50:04 -0500 Subject: Simple stop on error Closes #1 --- tasks/bootlint.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tasks') diff --git a/tasks/bootlint.js b/tasks/bootlint.js index 3bb6e5a..fc400e7 100644 --- a/tasks/bootlint.js +++ b/tasks/bootlint.js @@ -30,7 +30,7 @@ module.exports = function(grunt) { grunt.registerMultiTask('bootlint', 'An HTML linter for Bootstrap projects', function() { var options = this.options({ - stoponerror: true // not implemented yet... + stoponerror: false }); // Iterate over all specified file groups. @@ -52,7 +52,11 @@ module.exports = function(grunt) { totalErrCount += errs.length; errs.forEach(function (msg) { - grunt.log.warn(filepath + ':', msg.error); + if (options.stoponerror) { + grunt.fail.warn(filepath + ':' + msg.error); + } else { + grunt.log.warn(filepath + ':', msg.error); + } }); }); -- cgit v1.2.3