From 08891fa636516bb0134e90875e45a5f23725aeb4 Mon Sep 17 00:00:00 2001 From: Gordon Diggs Date: Tue, 9 Feb 2016 14:40:44 -0500 Subject: [PATCH 1/2] Only output timing information if debug is set to true. Trying to make STDERR quieter --- bin/eslint.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/eslint.js b/bin/eslint.js index 4491a28a7..69223db4d 100755 --- a/bin/eslint.js +++ b/bin/eslint.js @@ -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; } From 838f269d199c12ff94b6f67fb70e9d216427d68d Mon Sep 17 00:00:00 2001 From: Gordon Diggs Date: Tue, 9 Feb 2016 15:03:24 -0500 Subject: [PATCH 2/2] Separate issues by lines as well Docker's buffers have issues when there is one really big line (see https://github.com/docker/docker/issues/20119). When we overwrote `console.log`, we lost the `\n`. This could be causing issues. --- bin/eslint.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/eslint.js b/bin/eslint.js index 69223db4d..1bf309ef8 100755 --- a/bin/eslint.js +++ b/bin/eslint.js @@ -218,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"); }); }); });