|
|
@ -54,10 +54,10 @@ var grep = function (pattern, cb) {
|
|
|
|
}).join(' ');
|
|
|
|
}).join(' ');
|
|
|
|
|
|
|
|
|
|
|
|
// grep this repository, ignoring binary files and excluding anything matching the above patterns
|
|
|
|
// grep this repository, ignoring binary files and excluding anything matching the above patterns
|
|
|
|
var ignoreBinaries= '--binary-files=without-match ';
|
|
|
|
//var ignoreBinaries= '--binary-files=without-match ';
|
|
|
|
var command = 'git grep ' + pattern + " -- ':/' " + exclude;
|
|
|
|
var command = 'git grep ' + pattern + " -- ':/' " + exclude;
|
|
|
|
|
|
|
|
|
|
|
|
Exec(command, function (err, stdout, stderr) {
|
|
|
|
Exec(command, function (err, stdout /*, stderr */) {
|
|
|
|
if (err && err.code === 1 && err.killed === false) {
|
|
|
|
if (err && err.code === 1 && err.killed === false) {
|
|
|
|
if (isPossiblyGenerated(pattern)) {
|
|
|
|
if (isPossiblyGenerated(pattern)) {
|
|
|
|
return cb(void 0, true, 'POSSIBLY_GENERATED');
|
|
|
|
return cb(void 0, true, 'POSSIBLY_GENERATED');
|
|
|
@ -114,13 +114,14 @@ var next = function () {
|
|
|
|
if (!key) { return; }
|
|
|
|
if (!key) { return; }
|
|
|
|
keys.shift();
|
|
|
|
keys.shift();
|
|
|
|
|
|
|
|
|
|
|
|
if (!limit--) { return void console.log("[DONE]"); }
|
|
|
|
if (!limit) { return void console.log("[DONE]"); }
|
|
|
|
|
|
|
|
limit--;
|
|
|
|
|
|
|
|
|
|
|
|
grep(key, function (err, flagged, reason, output) {
|
|
|
|
grep(key, function (err, flagged, reason, output) {
|
|
|
|
if (err) {
|
|
|
|
if (err) {
|
|
|
|
return;
|
|
|
|
|
|
|
|
console.error("[%s]", key, err);
|
|
|
|
console.error("[%s]", key, err);
|
|
|
|
console.log();
|
|
|
|
console.log();
|
|
|
|
|
|
|
|
return;
|
|
|
|
} else if (!flagged) {
|
|
|
|
} else if (!flagged) {
|
|
|
|
|
|
|
|
|
|
|
|
} else if (reason === 'OTHER') {
|
|
|
|
} else if (reason === 'OTHER') {
|
|
|
|