Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/grunt-bootlint.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorZac Echola <zac.echola@so.mnscu.edu>2014-11-11 00:55:55 +0300
committerZac Echola <zac.echola@so.mnscu.edu>2014-11-11 00:55:55 +0300
commit6933a9e96a52728975d465506d8395ce2ad8c585 (patch)
tree60b89b90b354729edefef47df4aeed4c7fefd402 /tasks
parent34b397512cdaa11e70a8e82731a8a5d63613989f (diff)
fixing stoponerror
Diffstat (limited to 'tasks')
-rw-r--r--tasks/bootlint.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/tasks/bootlint.js b/tasks/bootlint.js
index 8338f79..abec81f 100644
--- a/tasks/bootlint.js
+++ b/tasks/bootlint.js
@@ -21,7 +21,6 @@ module.exports = function(grunt) {
var totalErrCount = 0;
var totalFileCount = 0;
- var hardfail = false;
// Iterate over all specified file groups.
this.files.forEach(function(f) {
@@ -48,13 +47,15 @@ module.exports = function(grunt) {
totalErrCount++;
output = true;
});
+
}
if (!output) {
grunt.log.warn(filepath + ":", lintId, lint.message);
totalErrCount++;
- if (options.stoponerror) {
- hardfail = true;
- }
+ }
+
+ if (options.stoponerror) {
+ grunt.fail.warn('boom!');
}
};
@@ -65,9 +66,6 @@ module.exports = function(grunt) {
if (totalErrCount > 0) {
grunt.log.writeln().fail(totalErrCount + " lint error(s) found across " + totalFileCount + " file(s).");
grunt.log.writeln().fail('For details, look up the lint problem IDs in the Bootlint wiki: https://github.com/twbs/bootlint/wiki');
- if (hardfail) {
- grunt.fail.warn('Too many bootlint errors.');
- }
} else {
grunt.log.ok(totalFileCount + ' file(s) lint free.');
}