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
diff options
context:
space:
mode:
authorNicholas Bartlett <ntbartle@us.ibm.com>2014-11-10 23:34:04 +0300
committerNicholas Bartlett <ntbartle@us.ibm.com>2014-11-10 23:34:04 +0300
commiteda6bf0e0310b8a99e2b42b4fea110bb017d6354 (patch)
tree060d5495c126907aaed314dd31a441f1e8296af7
parent34b397512cdaa11e70a8e82731a8a5d63613989f (diff)
fixed stoponerror option not stopping grunt task
-rw-r--r--README.md2
-rw-r--r--tasks/bootlint.js6
2 files changed, 2 insertions, 6 deletions
diff --git a/README.md b/README.md
index 44813b9..08de82d 100644
--- a/README.md
+++ b/README.md
@@ -67,7 +67,7 @@ grunt.initConfig({
* Type: `Boolean`
* Default: `false`
-Breaks out of grunt task on first error. Use `--force` to force continue.
+Breaks out of grunt task if there are errors. Use `--force` to force continue.
#### options.relaxerror
diff --git a/tasks/bootlint.js b/tasks/bootlint.js
index 8338f79..131992e 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) {
@@ -52,9 +51,6 @@ module.exports = function(grunt) {
if (!output) {
grunt.log.warn(filepath + ":", lintId, lint.message);
totalErrCount++;
- if (options.stoponerror) {
- hardfail = true;
- }
}
};
@@ -65,7 +61,7 @@ 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) {
+ if (options.stoponerror) {
grunt.fail.warn('Too many bootlint errors.');
}
} else {