mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C#: Remove the override and ext column from the summaries printing test.
This commit is contained in:
@@ -516,10 +516,13 @@ string asPartialModel(UnboundCallable c) {
|
||||
)
|
||||
}
|
||||
|
||||
/** Computes the first 4 columns for neutral CSV rows of `c`. */
|
||||
string asPartialNeutralModel(UnboundCallable c) {
|
||||
/**
|
||||
* Gets the signature of `c` in the format `namespace;type;name;parameters`.
|
||||
*/
|
||||
string getSignature(UnboundCallable c) {
|
||||
exists(string namespace, string type, string name, string parameters |
|
||||
partialModel(c, namespace, type, name, parameters) and
|
||||
partialModel(c, namespace, type, name, parameters)
|
||||
|
|
||||
result =
|
||||
namespace + ";" //
|
||||
+ type + ";" //
|
||||
|
||||
@@ -80,7 +80,8 @@ class TargetApiSpecific extends CS::Callable {
|
||||
|
||||
predicate asPartialModel = ExternalFlow::asPartialModel/1;
|
||||
|
||||
predicate asPartialNeutralModel = ExternalFlow::asPartialNeutralModel/1;
|
||||
/** Computes the first 4 columns for neutral CSV rows of `c`. */
|
||||
predicate asPartialNeutralModel = ExternalFlow::getSignature/1;
|
||||
|
||||
/**
|
||||
* Holds if `t` is a type that is generally used for bulk data in collection types.
|
||||
|
||||
@@ -4,15 +4,15 @@ import semmle.code.csharp.dataflow.internal.ExternalFlow
|
||||
final private class NeutralCallableFinal = NeutralCallable;
|
||||
|
||||
class RelevantNeutralCallable extends NeutralCallableFinal {
|
||||
final string getCallableCsv() { result = asPartialNeutralModel(this) }
|
||||
final string getCallableCsv() { result = getSignature(this) }
|
||||
}
|
||||
|
||||
class RelevantSourceCallable extends SourceCallable {
|
||||
string getCallableCsv() { result = asPartialModel(this) }
|
||||
string getCallableCsv() { result = getSignature(this) }
|
||||
}
|
||||
|
||||
class RelevantSinkCallable extends SinkCallable {
|
||||
string getCallableCsv() { result = asPartialModel(this) }
|
||||
string getCallableCsv() { result = getSignature(this) }
|
||||
}
|
||||
|
||||
import TestSummaryOutput<IncludeSummarizedCallable>
|
||||
|
||||
@@ -10,7 +10,7 @@ class IncludeSummarizedCallable extends SummarizedCallableImplFinal {
|
||||
}
|
||||
|
||||
/** Gets a string representing the callable in semi-colon separated format for use in flow summaries. */
|
||||
final string getCallableCsv() { result = asPartialModel(this) }
|
||||
final string getCallableCsv() { result = getSignature(this) }
|
||||
|
||||
predicate relevantSummary(
|
||||
SummaryComponentStack input, SummaryComponentStack output, boolean preservesValue
|
||||
|
||||
Reference in New Issue
Block a user