コード例 #1
0
ファイル: main.js プロジェクト: keplersj/linter-gcc
 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;
 })
コード例 #2
0
 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;
 });
コード例 #3
0
ファイル: linter-scalac.js プロジェクト: ActualAdam/dotfiles
 .then(output =>
   helpers.parse(output, regex).concat(helpers.parse(output, compilerRegex)));
コード例 #4
0
 return helpers.exec(command, args, { stream: "stderr" }).then(function (output) {
   return helpers.parse(output, regex);
 });