-
Notifications
You must be signed in to change notification settings - Fork 1.7k
C#: Re-use asPartialModel in utility and test code. #8449
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
C#: Re-use asPartialModel in utility and test code. #8449
Conversation
…antSummarizedCallable out of the shared library (it is only used in C#).
} | ||
|
||
/** Computes the first 6 columns for CSV rows. */ | ||
string asPartialModel() { |
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 predicate and isBaseCallableOrPrototype
will now be public (since DataFlowCallable
is), which I don't think we want. Instead it would be better to add them as top-level predicates in DataFlowPrivate.qll
.
@@ -1022,46 +1022,6 @@ module Private { | |||
} | |||
} | |||
|
|||
/** Provides a query predicate for outputting a set of relevant flow summaries. */ |
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 still think it makes sense to have here, in case other languages want to use it later.
private string isExtensible(RefType ref) { | ||
if ref.isFinal() then result = "false" else result = "true" | ||
} | ||
private string isExtensible(RefType ref) { |
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.
These predicates should not be members of TargetApi
, as that means there is a Cartesian product with the implicit this
parameter.
string asPartialModel() { | ||
result = | ||
this.typeAsSummaryModel() + ";" // | ||
+ isExtensible(this.bestTypeForModel()) + ";" // |
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.
As QL4QL says: this.isExtensible
Thank you very much for the feedback! Considering the comments, I think it is easier to start over, instead of fixing the comments here as most of the changes needs to be reverted :-) |
In this PR we