Skip to content

Inline test expectations: Rename tagIsOptional to tagIsIgnored#21786

Open
hvitved wants to merge 1 commit intogithub:mainfrom
hvitved:inline-test-ignore-tags
Open

Inline test expectations: Rename tagIsOptional to tagIsIgnored#21786
hvitved wants to merge 1 commit intogithub:mainfrom
hvitved:inline-test-ignore-tags

Conversation

@hvitved
Copy link
Copy Markdown
Contributor

@hvitved hvitved commented May 4, 2026

Renames the tag to match the semantics and avoid confusion (such as me incorrectly using it in a Rust type inference test).

@github-actions github-actions Bot added the Rust Pull requests that update Rust code label May 4, 2026
@hvitved hvitved force-pushed the inline-test-ignore-tags branch from e58a8d8 to 80ccdcc Compare May 4, 2026 09:21
@hvitved hvitved added the no-change-note-required This PR does not need a change note label May 4, 2026
@hvitved hvitved marked this pull request as ready for review May 4, 2026 09:46
@hvitved hvitved requested a review from a team as a code owner May 4, 2026 09:46
Copilot AI review requested due to automatic review settings May 4, 2026 09:46
@hvitved hvitved requested a review from a team as a code owner May 4, 2026 09:46
Copy link
Copy Markdown
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.

Pull request overview

This PR updates the inline expectations test framework to rename the tag hook from tagIsOptional to tagIsIgnored, aligning the API name with its intended semantics and reducing the chance of misuse in downstream tests.

Changes:

  • Renamed the test hook from tagIsOptional to tagIsIgnored and updated related documentation in InlineExpectationsTest.qll.
  • Removed the now-obsolete optional-expectation handling path and ensured ignored tags are filtered when parsing expectations.
  • Updated the Rust type inference inline test to stop using the old tagIsOptional hook.
Show a summary per file
File Description
shared/util/codeql/util/test/InlineExpectationsTest.qll Renames the tag hook to tagIsIgnored and updates the framework’s handling of ignored tags.
rust/ql/test/library-tests/type-inference/type-inference.ql Removes usage of the old tagIsOptional hook in the Rust type inference inline expectations test.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@hvitved
Copy link
Copy Markdown
Contributor Author

hvitved commented May 4, 2026

Rerun has been triggered: 2 restarted 🚀

@hvitved hvitved requested a review from jketema May 4, 2026 13:24
Copy link
Copy Markdown
Contributor

@jketema jketema left a comment

Choose a reason for hiding this comment

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

Since you're also removing the only use of tagIsOptional, should be just remove it completely instead of renaming/fixing it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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