Remove nullDocs logging - Tolerant parser doesn't produce null SourceFileNodes
parent
9c35aa6bd0
commit
22481480e3
|
@ -193,19 +193,11 @@ class Indexer
|
||||||
$mem = (int)(memory_get_usage(true) / (1024 * 1024));
|
$mem = (int)(memory_get_usage(true) / (1024 * 1024));
|
||||||
$this->client->window->logMessage(
|
$this->client->window->logMessage(
|
||||||
MessageType::INFO,
|
MessageType::INFO,
|
||||||
"All $count PHP files parsed in $duration seconds. $mem MiB allocated. " . \count($this->nullDocs) . " null docs"
|
"All $count PHP files parsed in $duration seconds. $mem MiB allocated."
|
||||||
);
|
);
|
||||||
foreach ($this->nullDocs as $nullDoc) {
|
|
||||||
$this->client->window->logMessage(
|
|
||||||
MessageType::INFO,
|
|
||||||
$nullDoc
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private $nullDocs = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $files
|
* @param array $files
|
||||||
* @return Promise
|
* @return Promise
|
||||||
|
@ -224,9 +216,6 @@ class Indexer
|
||||||
$this->client->window->logMessage(MessageType::LOG, "Parsing $uri");
|
$this->client->window->logMessage(MessageType::LOG, "Parsing $uri");
|
||||||
try {
|
try {
|
||||||
$document = yield $this->documentLoader->load($uri);
|
$document = yield $this->documentLoader->load($uri);
|
||||||
if ($document->getStmts() === null) {
|
|
||||||
$this->nullDocs[] = $document->getUri();
|
|
||||||
}
|
|
||||||
if (!isVendored($document, $this->composerJson)) {
|
if (!isVendored($document, $this->composerJson)) {
|
||||||
$this->client->textDocument->publishDiagnostics($uri, $document->getDiagnostics());
|
$this->client->textDocument->publishDiagnostics($uri, $document->getDiagnostics());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue