From 8c084b2437bd0e3da9e7be4dc64448500cfe248b Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 21 May 2020 00:05:33 -0700 Subject: [PATCH] Clear code coverage on file save #3252 --- src/goCover.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/goCover.ts b/src/goCover.ts index f0490e844..6185838c0 100644 --- a/src/goCover.ts +++ b/src/goCover.ts @@ -32,7 +32,7 @@ let decoratorConfig: { // a list of modified, unsaved go files with actual code edits (rather than comment edits) let modifiedFiles: { [key: string]: boolean; -}; +} = {}; /** * Initializes the decorators used for Code coverage. @@ -298,7 +298,7 @@ export function applyCodeCoverage(editor: vscode.TextEditor) { * @param e TextDocument */ export function removeCodeCoverageOnFileSave(e: vscode.TextDocument) { - if (e.languageId !== 'go' || !isCoverageApplied || !e.isDirty) { + if (e.languageId !== 'go' || !isCoverageApplied) { return; }