From 964dc608de0fac41d37774d3554bfc121a458b71 Mon Sep 17 00:00:00 2001 From: SeeBasTStick <sebastian.stock@hhu.de> Date: Wed, 15 Jul 2020 12:31:13 +0200 Subject: [PATCH] removed print statements --- server/src/errorHandler.ts | 4 ---- server/src/server.ts | 15 ++++----------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/server/src/errorHandler.ts b/server/src/errorHandler.ts index a4a357a..67d9566 100644 --- a/server/src/errorHandler.ts +++ b/server/src/errorHandler.ts @@ -62,10 +62,8 @@ export function buildErrors(errorLines : Array<string> ): Map<string, Set<NDJSON */ export function matchErrors(infos: Set<NDJSON>, file?: TextDocument | undefined): Array<Diagnostic> { let result: Array<Diagnostic> = new Array() - console.log("infos " + infos) for (var info of infos) { - console.log("type" + info.type) let serveity: DiagnosticSeverity = DiagnosticSeverity.Error if (info.type == "error") { @@ -131,8 +129,6 @@ export interface NDJSON { start: StartOrEnd end: StartOrEnd prob_version : string -// main_file : string -// dependencies : Array<string> } diff --git a/server/src/server.ts b/server/src/server.ts index d8494d2..f8a5081 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -175,10 +175,10 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> { let documentPath: path.ParsedPath = path.parse(URI.parse(textDocument.uri).path); - let errorDic : string = documentPath.dir + '/tmp' - let errorPath: string = errorDic + '/_error.json' + let errorDic : string = documentPath.dir + path.sep + 'tmp' + let errorPath: string = errorDic + path.sep + '_error.json' + - const { exec } = require('child_process'); if (!fs.existsSync(errorDic)){ @@ -206,19 +206,13 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> { for(let dependency of allFilesAndCorrespondingErrors.keys()) { - console.log(dependency) - console.log(documentPath.dir+documentPath.name+documentPath.ext) - if(dependency == (documentPath.dir+documentPath.name+documentPath.ext)){ - console.log("is:main") + if(dependency == (documentPath.dir+ path.sep + documentPath.name+documentPath.ext)){ let errors : Set<NDJSON> = allFilesAndCorrespondingErrors.get(dependency)!! - console.log("errors " + errors) let diagnostics = matchErrors(errors, textDocument) connection.sendDiagnostics({ uri: dependency, diagnostics }); }else{ - console.log("is:dep") let errors : Set<NDJSON> = allFilesAndCorrespondingErrors.get(dependency)!! let diagnostics = matchErrors(errors) - console.log("errors " + errors) connection.sendDiagnostics({ uri: dependency, diagnostics }); } } @@ -227,7 +221,6 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> { for(let dependency of filesToReset) { - console.log("reset:errrors") let diagnostics : Array<Diagnostic> = new Array() connection.sendDiagnostics({ uri: dependency, diagnostics }); } -- GitLab