Skip to content

Commit

Permalink
use path.relative
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelAquilina committed Mar 27, 2024
1 parent a95a72e commit f0ba2da
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import _, { forEach } from 'lodash';
import _ from 'lodash';
import { relative } from "path"

Check failure on line 2 in src/snyk/snykCode/views/suggestion/codeSuggestionWebviewProvider.ts

View workflow job for this annotation

GitHub Actions / Build and Test (ubuntu-latest)

Replace `"path"` with `'path';`
import { applyPatch } from 'diff';
import { marked } from 'marked';
import * as vscode from 'vscode';
Expand All @@ -22,7 +23,6 @@ import { ILog } from '../../../common/logger/interfaces';
import { messages as learnMessages } from '../../../common/messages/learn';
import { LearnService } from '../../../common/services/learnService';
import { getNonce } from '../../../common/views/nonce';
import { WebviewPanelSerializer } from '../../../common/views/webviewPanelSerializer';
import { WebviewProvider } from '../../../common/views/webviewProvider';
import { ExtensionContext } from '../../../common/vscode/extensionContext';
import { IVSCodeLanguages } from '../../../common/vscode/languages';
Expand Down Expand Up @@ -173,7 +173,7 @@ export class CodeSuggestionWebviewProvider
return {
id: issue.id,
title: issue.title,
uri: issue.filePath.replace(workspaceFolder + '/', ''),
uri: relative(workspaceFolder, issue.filePath),
severity: _.capitalize(issue.severity),
...issue.additionalData,
text: parsedDetails,
Expand Down Expand Up @@ -439,7 +439,7 @@ export class CodeSuggestionWebviewProvider
<section class="ai-fix">
<p>⚡ Fix this issue by generating a solution using Snyk DeepCode AI</p>
<div class="sn-fix-wrapper">
<button class="generate-ai-fix">✨ Generate fix <span class="wide">using Snyk DeepCode AI</span></button>
Expand Down

0 comments on commit f0ba2da

Please sign in to comment.