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
Consolidate all InlineFlowTest libraries in the dataflow qlpack
#14050
Conversation
d37a4d0
to
ff12882
Compare
InlineFlowTest libraries in the dataflow qlpack
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.
Java changes LGTM. Thanks for doing this, it feels good to witness tests and test libraries getting increasingly cleaner :)
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 great, thanks for doing this. A few minor questions.
| predicate isSink(DataFlowLang::Node sink) { none() } | ||
| } | ||
|
|
||
| module FlowTest<DataFlow::ConfigSig ValueFlowConfig, DataFlow::ConfigSig TaintFlowConfig> { |
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.
Can this be private?
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.
No, there are tests that override both configurations. For example:
| import FlowTest<DefaultFlowConfig, SinatraConfig> |
and:
| import FlowTest<CustomConfig, CustomConfig> |
| @@ -1,4 +1,5 @@ | |||
| import go | |||
| import TestUtilities.InlineExpectationsTest | |||
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 is this import needed?
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.
This was originally exposed through InlineFlowTest, which it is no longer. It's needed later in this file, because it also defines an inline expectation test next to an inline flow test.
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'd happily expose this again through InlineFlowTest (and the same below), but this seems somewhat cleaner.
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.
Yeah, this is certainly better.
| @@ -1,4 +1,5 @@ | |||
| import java | |||
| import semmle.code.java.dataflow.ExternalFlow | |||
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.
same
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.
This was originally exposed through InlineFlowTest, which it is no longer. It's needed later in this file for ModelValidation.
No description provided.