Skip to content

Commit 7ed2b9c

Browse files
committed
fix Files text
1 parent b510107 commit 7ed2b9c

File tree

2 files changed

+28
-23
lines changed

2 files changed

+28
-23
lines changed

csharp/ql/integration-tests/all-platforms/blazor_build_mode_none/Files.expected

+10-10
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
| BlazorTest/Components/Routes.razor |
99
| BlazorTest/Components/_Imports.razor |
1010
| BlazorTest/Program.cs |
11-
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/[...]_ql_csharp_ql_integration_tests_all_platforms_blazor_build_mode_none_test_test_BlazorTest_Components_App_razor.g.cs |
12-
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/[...]_ql_csharp_ql_integration_tests_all_platforms_blazor_build_mode_none_test_test_BlazorTest_Components_Layout_MainLayout_razor.g.cs |
13-
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/[...]_ql_csharp_ql_integration_tests_all_platforms_blazor_build_mode_none_test_test_BlazorTest_Components_Layout_NavMenu_razor.g.cs |
14-
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/[...]_ql_csharp_ql_integration_tests_all_platforms_blazor_build_mode_none_test_test_BlazorTest_Components_MyInput_razor.g.cs |
15-
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/[...]_ql_csharp_ql_integration_tests_all_platforms_blazor_build_mode_none_test_test_BlazorTest_Components_MyOutput_razor.g.cs |
16-
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/[...]_ql_csharp_ql_integration_tests_all_platforms_blazor_build_mode_none_test_test_BlazorTest_Components_Pages_Error_razor.g.cs |
17-
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/[...]_ql_csharp_ql_integration_tests_all_platforms_blazor_build_mode_none_test_test_BlazorTest_Components_Pages_TestPage_razor.g.cs |
18-
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/[...]_ql_csharp_ql_integration_tests_all_platforms_blazor_build_mode_none_test_test_BlazorTest_Components_Routes_razor.g.cs |
19-
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/[...]_ql_csharp_ql_integration_tests_all_platforms_blazor_build_mode_none_test_test_BlazorTest_Components__Imports_razor.g.cs |
20-
| test-db/working/implicitUsings/GlobalUsings.g.cs |
11+
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/Components_App_razor.g.cs |
12+
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/Components_Layout_MainLayout_razor.g.cs |
13+
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/Components_Layout_NavMenu_razor.g.cs |
14+
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/Components_MyInput_razor.g.cs |
15+
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/Components_MyOutput_razor.g.cs |
16+
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/Components_Pages_Error_razor.g.cs |
17+
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/Components_Pages_TestPage_razor.g.cs |
18+
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/Components_Routes_razor.g.cs |
19+
| [...]/Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/Components__Imports_razor.g.cs |
20+
| test-db/working/implicitUsings/GlobalUsings.g.cs |

csharp/ql/integration-tests/all-platforms/blazor_build_mode_none/Files.ql

+18-13
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
import csharp
22

3+
private string razorSourceGenerator() {
4+
result =
5+
"Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator"
6+
}
7+
38
private string getPath(File f) {
49
result = f.getRelativePath() and
5-
not exists(
6-
result.indexOf("_ql_csharp_ql_integration_tests_all_platforms_blazor_build_mode_none_")
7-
)
10+
not exists(result.indexOf(razorSourceGenerator()))
811
or
9-
exists(int index1, int index2, string pattern |
10-
pattern =
11-
"Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator" and
12-
index1 = f.getRelativePath().indexOf(pattern) and
13-
index2 =
14-
f.getRelativePath()
15-
.indexOf("_ql_csharp_ql_integration_tests_all_platforms_blazor_build_mode_none_") and
16-
result =
17-
"[...]/" + f.getRelativePath().substring(index1, index1 + pattern.length()) + "/[...]" +
18-
f.getRelativePath().substring(index2, f.getRelativePath().length())
12+
exists(int index1, string path | path = f.getRelativePath() |
13+
// pattern =
14+
// "Microsoft.CodeAnalysis.Razor.Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator" and
15+
// index1 = f.getRelativePath().indexOf(pattern) and
16+
// index2 =
17+
// f.getRelativePath()
18+
// .indexOf("_ql_csharp_ql_integration_tests_all_platforms_blazor_build_mode_none_") and
19+
// result =
20+
// "[...]/" + f.getRelativePath().substring(index1, index1 + pattern.length()) + "/[...]" +
21+
// f.getRelativePath().substring(index2, f.getRelativePath().length())
22+
index1 = path.indexOf(razorSourceGenerator()) and
23+
result = "[...]/" + f.getRelativePath().substring(index1, path.length())
1924
)
2025
}
2126

0 commit comments

Comments
 (0)