Skip to content

Conversation

@zuoyaofu
Copy link
Contributor

@zuoyaofu zuoyaofu commented Feb 21, 2025

Problem

When running a new /review scan, Q fails to respect previously added ignore line, causing ignored issues to reappear in subsequent reviews.

Solution

Fixed incorrect filter logic on ignoring single line issue
Old unit tests for listScanResults will not work after this change. So in addition, I improved all of securityScanHandler's unit tests to not use any file stubs to better simulate real environment.


  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions
Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.

@zuoyaofu zuoyaofu marked this pull request as ready for review February 21, 2025 23:54
@zuoyaofu zuoyaofu requested review from a team as code owners February 21, 2025 23:54
const aggregatedCodeScanIssue: AggregatedCodeScanIssue = {
filePath: filePath,
issues: issues.map((issue) => mapRawToCodeScanIssue(issue, editor, jobId, scope)),
issues: issues.map((issue) => mapRawToCodeScanIssue(issue, jobId, scope, document)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you can make this change even smaller by keeping the position of the editor/document argument the same

@zuoyaofu zuoyaofu enabled auto-merge February 25, 2025 23:54
})

function getWorkspaceFolder(): string {
return path.join(__dirname, '../../../../../../core/dist/src/testFixtures/workspaceFolder')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the src path instead of the dist path?

nextToken: nextToken ? 'nextToken' : undefined,
})

function getWorkspaceFolder(): string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use something like vscode.workspace.workspaceFolders[0].uri instead ? Aren't we already in the workspace folder?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@zuoyaofu zuoyaofu merged commit df810aa into aws:master Feb 26, 2025
25 of 26 checks passed
@zuoyaofu zuoyaofu deleted the ignore-bug branch March 3, 2025 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants