~ubuntu-branches/ubuntu/wily/phabricator/wily

« back to all changes in this revision

Viewing changes to src/lint/linter/reporter.js

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2014-11-01 23:20:06 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: package-import@ubuntu.com-20141101232006-mvlnp0cil67tsboe
Tags: upstream-0~git20141101/arcanist
Import upstream version 0~git20141101, component arcanist

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
module.exports = {
 
2
  reporter: function (results) {
 
3
    var report = [];
 
4
 
 
5
    results.forEach(function (result) {
 
6
      var error = result.error;
 
7
      report.push({
 
8
        'file'    : result.file,
 
9
        'line'    : error.line,
 
10
        'col'     : error.character,
 
11
        'reason'  : error.reason,
 
12
        'code'    : error.code,
 
13
      });
 
14
    });
 
15
 
 
16
    process.stdout.write(JSON.stringify(report));
 
17
  }
 
18
};