Go: database local sources for MongoDB#18493
Merged
egregius313 merged 11 commits intogithub:mainfrom Feb 21, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Files not reviewed (1)
- go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/go.mod: Language not supported
Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more
Contributor
Click to show differences in coveragegoGenerated file changes for go
- `MongoDB Go Driver <https://www.mongodb.com/docs/drivers/go/current/>`_,``go.mongodb.org/mongo-driver*``,,,14
+ `MongoDB Go Driver <https://www.mongodb.com/docs/drivers/go/current/>`_,``go.mongodb.org/mongo-driver*``,11,5,14
- Totals,,459,947,1532
+ Totals,,470,952,1532
- go.mongodb.org/mongo-driver/mongo,14,,,,,,,14,,,,,,,,,,,,,,,,,,,
+ go.mongodb.org/mongo-driver/mongo,14,11,5,,,,,14,,,,,,,,,,,,,11,,,,,5, |
owen-mc
reviewed
Jan 15, 2025
Contributor
owen-mc
left a comment
There was a problem hiding this comment.
Everything here looks good. Two points:
- I think we should also model
Client.Watch. - We normally record the depstubber invocation as a go generate comment. If you search for "//go:generate depstubber" you'll see what I mean. This makes it easy to regenerate the stubs in future, e.g. if the library changes, or if you want some extra stubs. If you still have the depstubber command available then it would be helpful to record it in this way.
owen-mc
reviewed
Feb 13, 2025
| @@ -1,8 +1,9 @@ | |||
| //go:generate depstubber -vendor go.mongodb.org/mongo-driver/mongo Client,Collection,Database | |||
Contributor
There was a problem hiding this comment.
This line should instead go at the top of the related test. That way it won't be deleted if the file is ever regenerated.
owen-mc
reviewed
Feb 21, 2025
.../test/library-tests/semmle/go/dataflow/flowsources/local/database/test_mongo_driver_mongo.go
Outdated
Show resolved
Hide resolved
owen-mc
approved these changes
Feb 21, 2025
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.
Models the
go.mongodb.org/mongo-driver/mongopackage.Pull Request checklist
All query authors
- [ ] All new queries have appropriate.qhelp. See the documentation in this repository.- [ ] QL tests are added if necessary. See Testing custom queries in the GitHub documentation.- [ ] New and changed queries have correct query metadata. See the documentation in this repository.Internal query authors only
- [ ] Autofixes generated based on these changes are valid, only needed if this PR makes significant changes to.ql,.qll, or.qhelpfiles. See the documentation (internal access required).- [ ] Adding a new query? Consider also adding the query to autofix.