8000 Print filename before analyzing it in debug mode · codeclimate/codeclimate-eslint@7b84d4a · GitHub
[go: up one dir, main page]

Skip to content

Commit 7b84d4a

Browse files
committed
Print filename before analyzing it in debug mode
Allows us to identify if there are files which cause performance problems or memory growth.
1 parent a5dc53e commit 7b84d4a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

bin/eslint.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ var fs = require("fs");
88
var glob = require("glob");
99
var options = { extensions: [".js"], ignore: true, reset: false, useEslintrc: true };
1010
var cli = new CLIEngine(options);
11+
var debug = false;
1112
var checks = require("../lib/checks");
1213

1314
// a wrapper for emitting perf timing
@@ -175,6 +176,10 @@ runWithTiming("engineConfig", function () {
175176
if (userConfig.extensions) {
176177
options.extensions = userConfig.extensions;
177178
}
179+
180+
if (userConfig.debug) {
181+
debug = true;
182+
}
178183
}
179184
});
180185

@@ -191,6 +196,10 @@ function analyzeFiles() {
191196
while(analysisFiles.length > 0) {
192197
batchFiles = analysisFiles.splice(0, batchSize);
193198

199+
if (debug) {
200+
process.stderr.write("Analyzing: " + batchFiles + "\n");
201+
}
202+
194203
runWithTiming("analyze-batch-" + batchNum, function() {
195204
batchReport = cli.executeOnFiles(batchFiles);
196205
});

0 commit comments

Comments
 (0)
0