Ejemplo n.º 1
0
 return helpers.exec(command.binary, command.args, {stream: "stderr"}).then(output => {
   msgs = helpers.parse(output, regex)
   msgs.forEach(function(entry){
     entry.filePath = real_file;
   })
   if (msgs.length == 0 && output.indexOf("error") != -1){
     msgs = [{
       type: 'error',
       text: output,
       filePath: real_file
     }];
   }
   module.exports.messages[real_file] = msgs;
   if (typeof module.exports.linter_gcc != "undefined"){
     module.exports.linter_gcc.setMessages(require("./utility").flattenHash(module.exports.messages))
   }
   return msgs;
 })
 return helpers.exec(command.binary, command.args, { stream: "stderr" }).then(function (output) {
   msgs = helpers.parse(output, regex);
   msgs.forEach(function (entry) {
     if (entry.filePath === module.exports.temp_file["C"] || entry.filePath === module.exports.temp_file["C++"]) {
       entry.filePath = real_file;
     }
   });
   if (msgs.length == 0 && output.indexOf("error") != -1) {
     msgs = [{
       type: 'error',
       text: output,
       filePath: real_file
     }];
   }
   module.exports.messages[real_file] = msgs;
   // console.log(msgs)
   if (typeof module.exports.linter_gcc != "undefined") {
     module.exports.linter_gcc.setMessages(JSON.parse(JSON.stringify(require("./utility").flattenHash(module.exports.messages))));
   }
   return msgs;
 });
Ejemplo n.º 3
0
 .then(output =>
   helpers.parse(output, regex).concat(helpers.parse(output, compilerRegex)));
 return helpers.exec(command, args, { stream: "stderr" }).then(function (output) {
   return helpers.parse(output, regex);
 });