-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go: Add database source models for the github.com/couchbase/gocb package (#2) #19088
Conversation
I had to remove quite a few incorrect method declarations for promoted methods.
There was a problem hiding this 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 adds database source models for both v1 and v2 of the github.com/couchbase/gocb package and updates supporting test files and change notes accordingly.
- Added new YAML definitions for couchbase source models.
- Introduced tests for v1 and v2 flows covering analytics, query, search, collection and transaction methods.
- Updated go:generate directives for Gorm, Beego ORM, and jmoiron/sqlx.
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
go/ql/lib/ext/github.com.couchbase.gocb.model.yml | Introduces new database source model definitions for various grouptypes and methods. |
go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/test_couchbase_gocb_v1.go | Adds tests exercising source flows for couchbase gocb v1. |
go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/test_couchbase_gocb_v2.go | Adds tests exercising source flows for couchbase gocb v2 covering multiple interfaces. |
go/ql/lib/change-notes/2025-03-03-couchbase-source-models.md | Describes the addition of database source models for the new version. |
go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/test_gorm.go | Updates depstubber directives for Gorm. |
go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/test_beego_orm.go | Updates depstubber directives for Beego ORM. |
go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/test_jmoiron_sqlx.go | Updates depstubber directives for jmoiron/sqlx. |
Files not reviewed (1)
- go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/go.mod: Language not supported
Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more
Click to show differences in coveragegoGenerated file changes for go
- `Couchbase official client(gocb) <https://github.com/couchbase/gocb>`_,"``github.com/couchbase/gocb*``, ``gopkg.in/couchbase/gocb*``",,36,16
+ `Couchbase official client(gocb) <https://github.com/couchbase/gocb>`_,"``github.com/couchbase/gocb*``, ``gopkg.in/couchbase/gocb*``",44,96,16
- `Couchbase unofficial client <http://www.github.com/couchbase/go-couchbase>`_,``github.com/couchbaselabs/gocb*``,,18,8
+ `Couchbase unofficial client <http://www.github.com/couchbase/go-couchbase>`_,``github.com/couchbaselabs/gocb*``,22,48,8
- Totals,,494,958,1556
+ Totals,,560,1048,1556
- github.com/couchbase/gocb,8,,18,,,,,8,,,,,,,,,,,,,,,,,,18,
+ github.com/couchbase/gocb,8,22,48,,,,,8,,,,,,,,,,,,,22,,,,,48,
- github.com/couchbaselabs/gocb,8,,18,,,,,8,,,,,,,,,,,,,,,,,,18,
+ github.com/couchbaselabs/gocb,8,22,48,,,,,8,,,,,,,,,,,,,22,,,,,48,
- gopkg.in/couchbase/gocb,8,,18,,,,,8,,,,,,,,,,,,,,,,,,18,
+ gopkg.in/couchbase/gocb,8,22,48,,,,,8,,,,,,,,,,,,,22,,,,,48, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks plausible
...y-tests/semmle/go/dataflow/flowsources/local/database/vendor/github.com/jmoiron/sqlx/stub.go
Outdated
Show resolved
Hide resolved
@smowton I had to delete some extraneous imports in the stubs and this dismissed your review. Please re-review. |
Copy of #18913 with some reviews applied that were more easily done on the command line.