-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: Make the models-as-data subtypes column do something more sensible for promoted methods #17618
base: main
Are you sure you want to change the base?
Conversation
subtypes = true and | ||
// p.type is an interface and we include types which implement it | ||
exists(Method m2, string pkg2, string type2 | | ||
subtypes = true and |
Check warning
Code scanning / CodeQL
Redundant assignment. Warning
The variable subtypes
the same value
cn = this.asCall().getNode() and | ||
result.asEntity() = cn.getTarget() and | ||
// result.asEntity().getName() = "Source" and | ||
cn = this.asCall().getNode() and |
Check warning
Code scanning / CodeQL
Redundant assignment. Warning
The variable cn
the same value
* field at depth `fieldDepth` which is on the chain of embedded fields which | ||
* leads to `m` being promoted, and the type of the field is `pkg.name`. | ||
*/ | ||
private predicate receiverInfoHelper( |
Check warning
Code scanning / CodeQL
Missing QLDoc for parameter Warning
depth = 1 and | ||
embeddedParent = st.getOwnField(_, true) and | ||
embeddedParent.getType().hasQualifiedName(pkg, name) | ||
or | ||
depth > 1 and | ||
exists(Type embeddedType, StructType st2 | | ||
st.hasOwnField(_, _, embeddedType, true) and | ||
st2 = embeddedType.getUnderlyingType() and | ||
m = st2.getMethodOfEmbedded(embeddedParent, _, depth - 1) and | ||
receiverInfoHelper(m, embeddedParent, st2, depth - 1, pkg, name) | ||
) |
Check warning
Code scanning / CodeQL
Var only used in one side of disjunct. Warning
Not ready for review yet. I think I've fixed all the spurious test results. I'm going to run DCA to see how this affects alerts.
To do: