Skip to content

Commit

Permalink
Merge pull request #60 from kubeshop/f1ames/fix/sarif-fork
Browse files Browse the repository at this point in the history
Migrate to SARIF fork
  • Loading branch information
f1ames authored Nov 30, 2023
2 parents eb8a5ad + e97b14f commit e31ac4e
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ This extension contributes the following settings:

A core component of Monokle extension and dependency is [`@monokle/validation` library](https://github.com/kubeshop/monokle-core/tree/main/packages/validation).

Monokle extension also uses [SARIF Viewer](https://marketplace.visualstudio.com/items?itemName=MS-SarifVSCode.sarif-viewer) extension as dependency. It should be installed automatically when installing Monokle extension.
Monokle extension depends on [Monokle SARIF Viewer](https://marketplace.visualstudio.com/items?itemName=Kubeshop.monokle-sarif) extension. It should be installed automatically when installing Monokle extension.

## Questions and contributing

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
}
},
"extensionDependencies": [
"ms-sarifvscode.sarif-viewer"
"kubeshop.monokle-sarif"
],
"scripts": {
"vscode:prepublish": "rimraf out && npm run esbuild-base -- --minify",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/show-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function getShowPanelCommand() {
status: 'started'
});

const sarifExtension = extensions.getExtension('MS-SarifVSCode.sarif-viewer');
const sarifExtension = extensions.getExtension('Kubeshop.monokle-sarif');

if (!sarifExtension.isActive) {
await sarifExtension.activate();
Expand Down
4 changes: 0 additions & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ async function runActivation(context: ExtensionContext) {

await globals.setDefaultOrigin();

// Pre-configure SARIF extension (workaround for #16).
workspace.getConfiguration('sarif-viewer').update('connectToGithubCodeScanning', 'off');
workspace.getConfiguration('sarif-viewer.explorer').update('openWhenNoResults', false);

const statusBarItem = window.createStatusBarItem(StatusBarAlignment.Left, 25);
statusBarItem.text = STATUS_BAR_TEXTS.DEFAULT;
statusBarItem.tooltip = getTooltipContentDefault();
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async function runSuite(
// Use cp.spawn / cp.exec for custom setup
spawnSync(
cliPath,
[...args, '--install-extension', 'ms-sarifvscode.sarif-viewer@3.3.8'],
[...args, '--install-extension', 'kubeshop.monokle-sarif@0.1.0'],
{
encoding: 'utf-8',
stdio: 'inherit'
Expand Down
2 changes: 1 addition & 1 deletion src/utils/sarif-watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class SarifWatcher {
}

protected async getSarifApi() {
const sarifExtension = extensions.getExtension('MS-SarifVSCode.sarif-viewer');
const sarifExtension = extensions.getExtension('Kubeshop.monokle-sarif');

if (!sarifExtension.isActive) {
await sarifExtension.activate();
Expand Down

0 comments on commit e31ac4e

Please sign in to comment.