Skip to content

Conversation

@owen-mc
Copy link
Contributor

@owen-mc owen-mc commented Feb 4, 2026

These tests were added in #18235 and #18275, but those two PRs were reverted in #18434. As a first step towards implementing them again now that we have proper post-update nodes and use-use flow I am committing these tests.

@owen-mc owen-mc requested a review from a team as a code owner February 4, 2026 13:44
Copilot AI review requested due to automatic review settings February 4, 2026 13:44
@owen-mc owen-mc added the no-change-note-required This PR does not need a change note label Feb 4, 2026
@github-actions github-actions bot added the Go label Feb 4, 2026
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.

Pull request overview

This pull request reintroduces tests for varargs (variadic parameter) flow in Go that were previously reverted. The tests are being committed as a preparatory step for future implementation with proper post-update nodes and use-use flow.

Changes:

  • Added new test suite VarArgsWithExternalFlow to test variadic parameters with external flow models
  • Enhanced existing test suites (VarArgsWithFunctionModels and VarArgs) with new test cases for variadic output parameters
  • Improved parameter naming in ExternalValueFlow/completetest.ql for better clarity

Reviewed changes

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

Show a summary per file
File Description
go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithFunctionModels/vendor/github.com/nonexistent/test/stub.go Added FunctionWithVarArgsOutParameter stub for testing variadic output parameters
go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithFunctionModels/main.go Added test cases for variadic out parameters and helper function for test infrastructure
go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithFunctionModels/go.mod Updated Go version to 1.25
go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithFunctionModels/Flows.ql Added data flow model for FunctionWithVarArgsOutParameter
go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithExternalFlow/vendor/modules.txt Added vendor modules file for new test suite
go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithExternalFlow/vendor/github.com/nonexistent/test/stub.go Added stub functions for testing external flow with varargs
go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithExternalFlow/main.go Added comprehensive test cases for varargs with external flow models
go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithExternalFlow/go.mod Added go.mod for new test suite with Go 1.25
go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithExternalFlow/Flows.ql Added query configuration for external flow tests
go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithExternalFlow/Flows.ext.yml Added external flow models for summary, source, and sink models
go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithExternalFlow/Flows.expected Added expected test results file
go/ql/test/library-tests/semmle/go/dataflow/VarArgs/main.go Added test cases for variadic out parameters
go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/completetest.ql Improved parameter naming from src to source and sink

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

Labels

Go 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.

1 participant