Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Clear code coverage on file save #3252
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed May 21, 2020
1 parent 95dda9d commit 8c084b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/goCover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 8c084b2

Please sign in to comment.