Kotlin: Address inline expectations testFailures. by geoffw0 · Pull Request #22079 · github/codeql · GitHub
Skip to content

Kotlin: Address inline expectations testFailures.#22079

Open
geoffw0 wants to merge 2 commits into
github:mainfrom
geoffw0:kotlininline
Open

Kotlin: Address inline expectations testFailures.#22079
geoffw0 wants to merge 2 commits into
github:mainfrom
geoffw0:kotlininline

Conversation

@geoffw0

@geoffw0 geoffw0 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Address testFailures in inline expectations tests. Annotations should always be updated so that the testFailures section of the .expected file is empty.

The issue here was missing inline expectations tags for spurious results involving pairs, triples etc. I don't know if we want to address this, but urgency is low.

@geoffw0 geoffw0 added no-change-note-required This PR does not need a change note Kotlin labels Jun 29, 2026
@github-actions github-actions Bot added the Java label Jun 29, 2026
@geoffw0 geoffw0 marked this pull request as ready for review June 29, 2026 10:37
@geoffw0 geoffw0 requested a review from a team as a code owner June 29, 2026 10:37
Copilot AI review requested due to automatic review settings June 29, 2026 10:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 Kotlin inline-expectations dataflow summary tests so that previously “unexpected” (spurious) results are explicitly annotated in-source, leaving the testFailures section in the corresponding .expected files empty again.

Changes:

  • Added // $ SPURIOUS: hasTaintFlow=... inline expectation tags for known spurious flows involving Pair, Triple, TimedValue, and MatchGroup accessors/components.
  • Removed the now-resolved testFailures entries from the Kotlin1 and Kotlin2 test.expected files (section remains present but empty, consistent with other tests).
Show a summary per file
File Description
java/ql/test-kotlin2/library-tests/dataflow/summaries/test.kt Adds SPURIOUS inline expectation tags for previously-unannotated spurious taint flows.
java/ql/test-kotlin2/library-tests/dataflow/summaries/test.expected Removes resolved testFailures tuples so the section is empty again.
java/ql/test-kotlin1/library-tests/dataflow/summaries/test.kt Mirrors the Kotlin2 SPURIOUS inline expectation annotations for Kotlin1 tests.
java/ql/test-kotlin1/library-tests/dataflow/summaries/test.expected Removes resolved testFailures tuples so the section is empty again.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Low

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

Labels

Java Kotlin no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants