Skip to content

Commit

Permalink
Merge pull request #4 from snyk/fix-ignore-string
Browse files Browse the repository at this point in the history
Fix ignore string
  • Loading branch information
Arvi3d authored Apr 6, 2021
2 parents 1fa6dfb + aacc2a5 commit 0992ae9
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "snyk",
"//": "Changing display name requires change in general.ts",
"displayName": "Snyk",
"version": "1.0.1",
"version": "1.0.2",
"description": "Snyk finds bugs, security vulnerabilities, performance and API issues based on AI. Snyk's speed of analysis allow us to analyse your code in real time and deliver results when you hit the save button in Visual Studio Code. We support Java, JavaScript, and TypeScript",
"icon": "images/readme/snyk_extension_icon.png",
"publisher": "snyk",
Expand Down
2 changes: 1 addition & 1 deletion src/snyk/constants/analysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const SNYK_SEVERITIES: { [key: string]: number } = {
error: 3
};

export const IGNORE_ISSUE_BASE_COMMENT_TEXT: string = "snyk ignore";
export const IGNORE_ISSUE_BASE_COMMENT_TEXT: string = "deepcode ignore";

export const FILE_IGNORE_ISSUE_BASE_COMMENT_TEXT: string = `file ${IGNORE_ISSUE_BASE_COMMENT_TEXT}`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class SnykIssuesActionProvider implements vscode.CodeActionProvider {
}
if (snykCommentPostition) {
const position = snykCommentPostition;
// if snyk ignore of issue already exists, paste next comment in same line after existing comment
// if deepcode ignore of issue already exists, paste next comment in same line after existing comment
editor.edit((e: vscode.TextEditorEdit) =>
e.insert(position, `, ${issueText}`)
);
Expand Down
4 changes: 1 addition & 3 deletions src/test/mocked_data/sample_repository/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ var browserVer;

if (agt.indexOf("opera") != -1) {
browserType = 'Opera';
// snyk ignore UseStrictEquality: <please specify a reason of ignoring this>
// snyk ignore UseStrictEquality: <please specify a reason of ignoring this>
// snyk ignore UseStrictEquality: <please specify a reason of ignoring this>
// deepcode ignore UseStrictEquality: <please specify a reason of ignoring this>

if (agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1) {
browserVer = "Opera7";
Expand Down
2 changes: 1 addition & 1 deletion src/test/suite/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const preTestConfigureExtension = () => {

// const uri = vscode.Uri.file(nodePath.join(mockedTestFilesDirPath, '../mocked_data/sample_repository', 'main.js'));

// const testIgnoreComment = ' // snyk ignore UseStrictEquality: <please specify a reason of ignoring this>\n';
// const testIgnoreComment = ' // deepcode ignore UseStrictEquality: <please specify a reason of ignoring this>\n';

suite("Snyk Extension Tests", () => {
let testExtension: ExtensionInterface;
Expand Down

0 comments on commit 0992ae9

Please sign in to comment.