Undo changes to diagnostics engine and import pipeline

They didn't seem necessary
This commit is contained in:
Elliot Berman 2018-03-20 08:47:12 -04:00 committed by Fangrui Song
parent c636eae680
commit 702eec9f2a
2 changed files with 5 additions and 6 deletions

View File

@ -13,6 +13,11 @@ void DiagnosticsEngine::Init(Config* config) {
void DiagnosticsEngine::Publish(WorkingFiles* working_files,
std::string path,
std::vector<lsDiagnostic> diagnostics) {
// Cache diagnostics so we can show fixits.
working_files->DoActionOnFile(path, [&](WorkingFile* working_file) {
if (working_file)
working_file->diagnostics_ = diagnostics;
});
int64_t now =
std::chrono::duration_cast<std::chrono::milliseconds>(

View File

@ -408,12 +408,6 @@ void ParseFile(Config* config,
for (std::unique_ptr<IndexFile>& new_index : *indexes) {
Timer time;
// Cache diagnostics so we can show fixits.
working_files->DoActionOnFile(path, [&](WorkingFile* working_file) {
if (working_file)
working_file->diagnostics_ = diagnostics;
});
// Only emit diagnostics for non-interactive sessions, which makes it easier
// to identify indexing problems. For interactive sessions, diagnostics are
// handled by code completion.