Skip to content

Commit

Permalink
Clean up to make this merge ready
Browse files Browse the repository at this point in the history
  • Loading branch information
spalmurray-codecov committed Aug 23, 2024
1 parent f4f8132 commit 1d6ad36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"properties": {
"codecov.coverage.enabled": {
"type": "boolean",
"default": "true",
"default": "false",
"description": "Toggle Codecov line coverage decorations.",
"order": 0
},
Expand Down
15 changes: 3 additions & 12 deletions src/node/coverage.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
// Todo list:
// - Create settings for configuring extension (DONE)
// - Store API key in extension secrets
// - parse commit and or branch for more accurate coverage: try branch -> fallback to default branch (DONE)
// - better error messaging (token unauthorized for example) (DONE)
//
// Stretch goals:
// Future goals:
// - Persist owner/repo names in workspace storage
// - Cache coverage
// - Selfhosted support (DONE)
// - Show coverage totals somewhere
// - maybe add codecov button to disable and/or view in codecov
// - gl/bb support (DONE)
// - Maybe add codecov button to disable and/or view in codecov

import {
ExtensionContext,
Expand Down Expand Up @@ -142,7 +134,6 @@ export function activateCoverage(context: ExtensionContext) {
workspace.asRelativePath(activeEditor.document.fileName)
);

// TODO: pull this out to its own function and cache it in the extension workspace context
const pathToWorkspace = workspace.getWorkspaceFolder(
Uri.file(activeEditor.document.fileName)
)?.uri.path;
Expand All @@ -165,7 +156,7 @@ export function activateCoverage(context: ExtensionContext) {

if (!branch) return;

// don't need this right now, but may be useful in the future if we want to cache coverage
// Don't need this right now, but may be useful in the future if we want to cache coverage
//const gitRefFile = Uri.file(`${pathToWorkspace}/.git/refs/heads/${branch}`);
//const commitHash = await workspace.fs
// .readFile(gitRefFile)
Expand Down

0 comments on commit 1d6ad36

Please sign in to comment.