Open
Conversation
Contributor
There was a problem hiding this comment.
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
VarArgsWithExternalFlowto test variadic parameters with external flow models - Enhanced existing test suites (
VarArgsWithFunctionModelsandVarArgs) with new test cases for variadic output parameters - Improved parameter naming in
ExternalValueFlow/completetest.qlfor 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.