Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@asgerf
Copy link
Contributor

@asgerf asgerf commented Feb 3, 2025

This changes the test post-processing query so that an explicit Source tag should be omitted for alerts where the source and alert location are on the same line.

Previously, the Source tag should be omitted when the locations were exactly the same; now they only have to be on the same line.

Currently both start and end lines have to match in order to be considered on the same line.

For context, I am trying to port the JS tests to post-processed inline expectations, and I'm seeing a lot of $ Alert Source expectations that seem unnecessary.

Previously the Source tag was required if the source and alert did not
have the exact same location. This relaxes the restriction to being on
the same line.

Note that in order to be "on the same line" both start and end lines
have to match.

It's still possible for a given line to expect both Alert and Source
tags, in case the source pairs up with another alert on a different
line.
@github-actions github-actions bot added JS Rust Pull requests that update Rust code labels Feb 3, 2025
@asgerf asgerf marked this pull request as ready for review February 3, 2025 13:26
Copilot AI review requested due to automatic review settings February 3, 2025 13:26
@asgerf asgerf requested a review from a team as a code owner February 3, 2025 13:26
@asgerf asgerf requested a review from hvitved February 3, 2025 13:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more

@asgerf asgerf added the no-change-note-required This PR does not need a change note label Feb 3, 2025
shared/util/codeql/util/test/InlineExpectationsTest.qll Outdated Show resolved Hide resolved
@asgerf asgerf merged commit 294fd0a into github:main Feb 4, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

JS no-change-note-required This PR does not need a change note Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.