Skip to content

Commit ca50f11

Browse files
committed
Swift: Hide locationless results in the inlineexpectations test (there's no way to make them expected).
1 parent 664500d commit ca50f11

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
| file://:0:0:0:0 | self | Unexpected result: hasPathInjection=208 |

swift/ql/test/query-tests/Security/CWE-022/PathInjectionTest.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class PathInjectionTest extends InlineExpectationsTest {
1919
location = sinkExpr.getLocation() and
2020
element = sinkExpr.toString() and
2121
tag = "hasPathInjection" and
22+
location.getFile().getName() != "" and
2223
value = source.asExpr().getLocation().getStartLine().toString()
2324
)
2425
}

0 commit comments

Comments
 (0)