Skip to content

Commit e9ac32f

Browse files
committed
Simplify generated file paths
1 parent 9089c9c commit e9ac32f

File tree

1 file changed

+15
-1
lines changed
  • csharp/ql/integration-tests/all-platforms/blazor_build_mode_none

1 file changed

+15
-1
lines changed
Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
import csharp
22

3+
private string getPath(File f) {
4+
result = f.getRelativePath() and
5+
not exists(result.indexOf("_ql_csharp_ql_integration_tests_blazor_build_mode_none_"))
6+
or
7+
exists(int index1, int index2, string pattern |
8+
pattern = "Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator" and
9+
index1 = f.getRelativePath().indexOf(pattern) and
10+
index2 = f.getRelativePath().indexOf("_ql_csharp_ql_integration_tests_blazor_build_mode_none_") and
11+
result =
12+
f.getRelativePath().substring(0, index1 + pattern.length()) + "/[...]" +
13+
f.getRelativePath().substring(index2, f.getRelativePath().length())
14+
)
15+
}
16+
317
from File f
418
where f.fromSource() or f.getExtension() = "razor"
5-
select f
19+
select getPath(f)

0 commit comments

Comments
 (0)