Skip to content

Commit 0d481b8

Browse files
committed
src/goMain: register VulncheckResultViewProvider
This will handle *.vulncheck.json files. Change-Id: I4308daaacd01988abf2db4610ddb24e6cc8d647f Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/406301 TryBot-Result: kokoro <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> Reviewed-by: Suzy Mueller <[email protected]> Reviewed-by: Jamal Carvalho <[email protected]>
1 parent dd2efbc commit 0d481b8

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

package.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2753,6 +2753,17 @@
27532753
"when": "go.hasProfiles"
27542754
}
27552755
]
2756-
}
2756+
},
2757+
"customEditors": [
2758+
{
2759+
"viewType": "vulncheck.view",
2760+
"displayName": "Vulnerability Report",
2761+
"selector": [
2762+
{
2763+
"filenamePattern": "*.vulncheck.json"
2764+
}
2765+
]
2766+
}
2767+
]
27572768
}
27582769
}

src/goMain.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ import extensionAPI from './extensionAPI';
6464
import { GoTestExplorer, isVscodeTestingAPIAvailable } from './goTest/explore';
6565
import { killRunningPprof } from './goTest/profile';
6666
import { GoExplorerProvider } from './goExplorer';
67-
import { VulncheckProvider } from './goVulncheck';
67+
import { VulncheckProvider, VulncheckResultViewProvider } from './goVulncheck';
6868

6969
import { GoExtensionContext } from './context';
7070
import * as commands from './commands';
@@ -170,6 +170,7 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<ExtensionA
170170

171171
GoExplorerProvider.setup(ctx);
172172
VulncheckProvider.setup(ctx, goCtx);
173+
VulncheckResultViewProvider.register(ctx);
173174

174175
registerCommand('go.test.generate.package', goGenerateTests.generateTestCurrentPackage);
175176
registerCommand('go.test.generate.file', goGenerateTests.generateTestCurrentFile);

0 commit comments

Comments
 (0)