diff --git a/src/goCheck.ts b/src/goCheck.ts index a6491ee95..62ffe6a0a 100644 --- a/src/goCheck.ts +++ b/src/goCheck.ts @@ -295,5 +295,11 @@ export function check(fileUri: vscode.Uri, goConfig: vscode.WorkspaceConfigurati }); } - return Promise.all(runningToolsPromises).then(resultSets => [].concat.apply([], resultSets)); + return Promise.all(runningToolsPromises).then(function(resultSets){ + let results: ICheckResult[] = [].concat.apply([], resultSets); + // Filter duplicates + return results.filter((results, index, self) => + self.findIndex((t) => { + return t.file === results.file && t.line === results.line && t.msg === results.msg && t.severity === results.severity; }) === index); + }); }