Skip to content

Commit

Permalink
fix: use code security panel for quality
Browse files Browse the repository at this point in the history
  • Loading branch information
ShawkyZ committed Oct 23, 2024
1 parent b462b32 commit b397188
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/snyk/snykCode/constants/analysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ export const DIAGNOSTICS_OSS_COLLECTION_NAME = 'Snyk Open Source Security';
export const DIAGNOSTICS_OSS_COLLECTION_NAME_LS = 'Snyk Open Source';

export const WEBVIEW_PANEL_SECURITY_TITLE = 'Snyk Code Issue';
export const WEBVIEW_PANEL_QUALITY_TITLE = 'Snyk Code Issue';
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ import { ExtensionContext } from '../../../common/vscode/extensionContext';
import { IVSCodeLanguages } from '../../../common/vscode/languages';
import { IVSCodeWindow } from '../../../common/vscode/window';
import { IVSCodeWorkspace } from '../../../common/vscode/workspace';
import { WEBVIEW_PANEL_QUALITY_TITLE, WEBVIEW_PANEL_SECURITY_TITLE } from '../../constants/analysis';
import { WEBVIEW_PANEL_SECURITY_TITLE } from '../../constants/analysis';
import { messages as errorMessages } from '../../messages/error';
import { getAbsoluteMarkerFilePath } from '../../utils/analysisUtils';
import { encodeExampleCommitFixes } from '../../utils/htmlEncoder';
import { generateDecorationOptions } from '../../utils/patchUtils';
import { IssueUtils } from '../../utils/issueUtils';
import { ICodeSuggestionWebviewProvider } from '../interfaces';
Expand Down Expand Up @@ -99,12 +98,12 @@ export class CodeSuggestionWebviewProvider
try {
await this.focusSecondEditorGroup();
if (this.panel) {
this.panel.title = this.getTitle(issue);
this.panel.title = this.getTitle();
this.panel.reveal(vscode.ViewColumn.Two, true);
} else {
this.panel = vscode.window.createWebviewPanel(
SNYK_VIEW_SUGGESTION_CODE,
this.getTitle(issue),
this.getTitle(),
{
viewColumn: vscode.ViewColumn.Two,
preserveFocus: true,
Expand Down Expand Up @@ -376,7 +375,7 @@ export class CodeSuggestionWebviewProvider
];
}

private getTitle(issue: Issue<CodeIssueData>): string {
return issue.additionalData.isSecurityType ? WEBVIEW_PANEL_SECURITY_TITLE : WEBVIEW_PANEL_QUALITY_TITLE;
private getTitle(): string {
return WEBVIEW_PANEL_SECURITY_TITLE;
}
}

0 comments on commit b397188

Please sign in to comment.