Skip to content

Commit 18f4b4b

Browse files
committed
Move showCoverage up hiring in the callstack
1 parent 26b6015 commit 18f4b4b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/extension.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ export async function activate(context: ExtensionContext) {
162162
coverages: CoverageCollection,
163163
workspaceFolder: string
164164
) {
165+
if (!showCoverage) return; // do nothing
166+
165167
for (const coverage of coverages) {
166168
if (coverage && coverage.lines && coverage.lines.details) {
167169
const fileName = !isAbsolute(coverage.file)
@@ -188,7 +190,6 @@ export async function activate(context: ExtensionContext) {
188190
) {
189191
const currentFile = window.activeTextEditor?.document.uri.fsPath;
190192
const diagnosticsForFiles: Diagnostic[] = [];
191-
if (!showCoverage) return diagnosticsForFiles;
192193

193194
for (const detail of details) {
194195
const line = detail.line - 1;

0 commit comments

Comments
 (0)