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@gmail.com>2014-10-18 07:14:40 +0400
committerZac Echola <zac.echola@gmail.com>2014-10-18 07:14:40 +0400
commit45384b87d6944b40ed7f27c9344abc0c598e3e2e (patch)
tree5dc48673380b100831611f2381069f46f97dbd17 /tasks
parent6f083dce6e8b3652d711602205b17831d4dc5013 (diff)
including chalk and URL to wiki
Diffstat (limited to 'tasks')
-rw-r--r--tasks/bootlint.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/tasks/bootlint.js b/tasks/bootlint.js
index 5a7342b..b82fa1c 100644
--- a/tasks/bootlint.js
+++ b/tasks/bootlint.js
@@ -10,8 +10,7 @@
module.exports = function(grunt) {
var bootlint = require('bootlint');
-
-
+ var chalk = require('chalk');
var msg = {
start: 'Validation started for ',
@@ -27,11 +26,12 @@ module.exports = function(grunt) {
var totalErrCount = 0;
var reporter = function(lint) {
+ var lintId = (lint.id[0] === 'E') ? chalk.bgGreen.white(lint.id) : chalk.bgRed.white(lint.id);
if (options.stoponerror) {
- grunt.fail.warn(lint.message);
+ grunt.fail.warn(lintId, lint.message);
} else {
- totalErrCount += 1;
- grunt.log.warn(lint.message);
+ grunt.log.warn(lintId, lint.message);
+ totalErrCount++;
}
};
@@ -56,6 +56,7 @@ module.exports = function(grunt) {
if (totalErrCount > 0) {
grunt.log.writeln().fail(totalErrCount + ' lint errors found.');
+ grunt.log.writeln().fail('For details, look up the lint problem IDs in the Bootlint wiki: https://github.com/twbs/bootlint/wiki');
} else {
grunt.log.writeln().success(msg.done);
}