-
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
Convert shared CFG construction library to a parameterized module #13509
Conversation
baa7bb3
to
6c3cf4e
Compare
5067515
to
37d9875
Compare
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.
Generally looks good to me. I wonder if we can get rid of most uses of AstNode
. Also don't forget to include the new library in the list of things to release in the build
file.
* For more information about locations see [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). | ||
*/ | ||
signature class LocationSig { | ||
/** Gets the 1-based line number (inclusive) where this location starts. */ |
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.
I guess you "forgot" getFile
on purpose, right?
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.
Yes, because that would require a File
class in scope.
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.
LGTM once DCA comes back happy 🤞!
This PR converts the existing
ControlFlowGraphImplShared.qll
to a parameterized module, and puts it into a newcontrolflow
QL pack (where, eventually, we can also put stuff like basic blocks and guards). In this PR, only Ruby is adopting the new shared library; I plan to do C# follow-up, and perhaps Swift (unless @github/codeql-swift beats me to it).Whitespace-insensitive commit-by-commit review is suggested.
The PR makes use of2.14.0 has now been released, so this PR is safe to merge.extends
inside parameterized modules, which is only publicly supported in 2.14.0 (expected to be released July 11th), so cannot be merged until then (this is the reason why the CI checkCompile all queries using the latest stable CodeQL CLI
currently fails).