Skip to content

Commit 658326d

Browse files
committed
Work around some instability on Windows
1 parent 07a5c20 commit 658326d

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
| Program.cs |
22
| Views/Home/Index.cshtml |
33
| test-db/working/implicitUsings/GlobalUsings.g.cs |
4-
| test-db/working/razor/EC52D77FE9BF67AD10C5C3F248392316/Microsoft.NET.Sdk.Razor.SourceGenerators/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/[...]_ql_csharp_ql_integration_tests_all_platforms_cshtml_standalone_net6_test_test_Views_Home_Index_cshtml.g.cs |
4+
| test-db/working/razor/EC52D77FE9BF67AD10C5C3F248392316/[...]/Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/[...]_ql_csharp_ql_integration_tests_all_platforms_cshtml_standalone_net6_test_test_Views_Home_Index_cshtml.g.cs |

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@ private string getPath(File f) {
44
result = f.getRelativePath() and
55
not exists(result.indexOf("_ql_csharp_ql_integration_tests_all_platforms_cshtml_standalone_"))
66
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
7+
exists(int index0, int index1, int index2, string pattern0, string pattern1 |
8+
// TODO: Remove index0 and pattern0. Currently there's some instability in the path depending on which dotnet SDK is being used. (See issue #448)
9+
pattern0 = "EC52D77FE9BF67AD10C5C3F248392316" and
10+
index0 = f.getRelativePath().indexOf(pattern0) and
11+
pattern1 = "Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator" and
12+
index1 = f.getRelativePath().indexOf(pattern1) and
1013
index2 =
1114
f.getRelativePath()
1215
.indexOf("_ql_csharp_ql_integration_tests_all_platforms_cshtml_standalone_") and
1316
result =
14-
f.getRelativePath().substring(0, index1 + pattern.length()) + "/[...]" +
17+
f.getRelativePath().substring(0, index0 + pattern0.length()) + "/[...]/" +
18+
f.getRelativePath().substring(index1, index1 + pattern1.length()) + "/[...]" +
1519
f.getRelativePath().substring(index2, f.getRelativePath().length())
1620
)
1721
}

0 commit comments

Comments
 (0)