Implemented "all messages" in task processor

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 11 years ago
parent 79002cea71
commit 47aa925330
  1. 11
      BuildServer/lib/task-processor.js

@ -50,8 +50,9 @@ exports.processTask = function (task, context, callback) {
var errors = {}, var errors = {},
warns = {}, warns = {},
infos = {}, infos = {},
messages = {},
messageProcessor = function (list) { messageProcessor = function (list) {
return function (message, prefix) { var f = function (list, message, prefix) {
var i, var i,
parts = prefix.split("/"), parts = prefix.split("/"),
innerList = list; innerList = list;
@ -66,6 +67,11 @@ exports.processTask = function (task, context, callback) {
list.$allMessages = list.$allMessages || []; list.$allMessages = list.$allMessages || [];
list.$allMessages.push({ prefix: prefix, message: message }); list.$allMessages.push({ prefix: prefix, message: message });
}; };
return function (message, prefix) {
f(list, message, prefix);
f(messages, message, prefix);
};
}, },
processor = new TaskProcessor(task, { processor = new TaskProcessor(task, {
onError: messageProcessor(errors), onError: messageProcessor(errors),
@ -76,7 +82,8 @@ exports.processTask = function (task, context, callback) {
callback(err, { callback(err, {
errors: errors, errors: errors,
warns: warns, warns: warns,
infos: infos infos: infos,
messages: messages
}); });
}); });

Loading…
Cancel
Save