We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 310a2c8 + 480ce39 commit d35a501Copy full SHA for d35a501
csharp/ql/src/definitions.qll
@@ -187,5 +187,11 @@ cached
187
Declaration definitionOf(Use use, string kind) {
188
result = use.getDefinition() and
189
result.fromSource() and
190
- kind = use.getUseType()
+ kind = use.getUseType() and
191
+ // Some entities have many locations. This can arise for files that
192
+ // are duplicated multiple times in the database at different
193
+ // locations. Rather than letting the result set explode, we just
194
+ // exclude results that are "too ambiguous" -- we could also arbitrarily
195
+ // pick one location later on.
196
+ strictcount(result.getLocation()) < 10
197
}
0 commit comments