-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Go: sync ExternalFlow.qll #16558
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: sync ExternalFlow.qll #16558
Conversation
d9dfb93
to
9c2667b
Compare
private predicate canonicalPackageHasASubpackage(string package, string subpkg) { | ||
canonicalPackage(package) and | ||
(subpkg = package or packageLink(package, subpkg)) | ||
} | ||
|
||
/** | ||
* Holds if MaD framework coverage of `package` is `n` api endpoints of the | ||
* kind `(kind, part)`, and `pkgs` is the number of subpackages of `package` | ||
* which have MaD framework coverage (including `package` itself). | ||
* kind `(kind, part)`. |
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.
Why does this stop documenting pkgs
, which still exists?
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.
To match the java and C# versions of this file, so they're easier to keep in sync or make into a shared library. You're right that it's better though. Maybe I'll keep it and make a tiny PR to add it to the others.
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.
Done here: #16676
) and | ||
not exists(Provenance provenance | | ||
neutralElement(this, "summary", provenance) and | ||
provenance.isManual() |
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.
isGenerated
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.
Actually it is correct. The idea is that generated summary models are overridden by manual neutral models. This allows us to fixed generated models in a way which will persist when they are regenerated.
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.
Let me know if you think there should be a comment briefly explaining this (and feel free to give a suggestion).
Looks plausible, except as noted |
This is needed for other languages, but in Go you cannot have two functions which are distinguished only by their parameter types.
97807e6
to
cbbdd01
Compare
I've addressed the review comments and rebased to check that this is still in a mergeable state, since it was quite old. There has been one change to the java copy of |
Update go's copy of
ExternalFlow.qll
to bring it in line with java and csharp's.Argument[-1]
. Now it isArgument[receiver]
. (Other languages use different terminology, such asArgument[this]
.)