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 89bab6a + aacb03a commit 8583a4fCopy full SHA for 8583a4f
csharp/ql/test/library-tests/csharp10/constInterpolatedString.ql
@@ -1,7 +1,13 @@
1
import csharp
2
3
-query predicate inserts(InterpolatedStringExpr expr, Expr e) { expr.getAnInsert() = e }
+private predicate inSpecificSource(Expr expr) {
4
+ expr.getFile().getBaseName() = "ConstInterpolatedString.cs"
5
+}
6
+
7
+query predicate inserts(InterpolatedStringExpr expr, Expr e) {
8
+ expr.getAnInsert() = e and inSpecificSource(expr)
9
10
11
query predicate texts(InterpolatedStringExpr expr, StringLiteral literal) {
- expr.getAText() = literal
12
+ expr.getAText() = literal and inSpecificSource(expr)
13
}
0 commit comments