Skip to content

Commit

Permalink
Merge pull request #71 from codeclimate/gd-debug
Browse files Browse the repository at this point in the history
Only output timing information if debug is set to true.
  • Loading branch information
gdiggs committed Feb 9, 2016
2 parents 0539b6d + 838f269 commit 024c30c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ function runWithTiming(name, fn) {
var start = new Date()
, rv = fn()
, duration = (new Date() - start) / 1000;
console.error("eslint.timing." + name + ": " + duration + "s");
if (debug) {
console.error("eslint.timing." + name + ": " + duration + "s");
}
return rv;
}

Expand Down Expand Up @@ -216,7 +218,7 @@ function analyzeFiles() {

result.messages.forEach(function(message) {
var issueJson = buildIssueJson(message, path);
process.stdout.write(issueJson + "\u0000");
process.stdout.write(issueJson + "\u0000\n");
});
});
});
Expand Down

0 comments on commit 024c30c

Please sign in to comment.