From b0855eb95464de331c612565369b3e3ca73b09af Mon Sep 17 00:00:00 2001 From: Vianney de Bellabre Date: Mon, 9 Sep 2024 14:13:09 +0200 Subject: [PATCH] Upgrade to 1.5.1 (#15) --- .../EcoCode/EC69.DontCallFunctionsInLoopConditions.cs | 8 +++++++- ecoCode-csharp-test-project.csproj | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/RuleTests/EcoCode/EC69.DontCallFunctionsInLoopConditions.cs b/RuleTests/EcoCode/EC69.DontCallFunctionsInLoopConditions.cs index d32f738..6fa238c 100644 --- a/RuleTests/EcoCode/EC69.DontCallFunctionsInLoopConditions.cs +++ b/RuleTests/EcoCode/EC69.DontCallFunctionsInLoopConditions.cs @@ -1,4 +1,6 @@ -namespace RuleTests.EcoCode; +using System.IO; + +namespace RuleTests.EcoCode; internal static class DontCallFunctionsInLoopConditions { @@ -21,5 +23,9 @@ public static void Run(int p) do j += i++; while (i < V1 && i < V2() && i < V3(i) && i < V3(j) && i < V3(k) && i < V3(p) && i < V3(C)); + + string? d = Path.GetDirectoryName("toto"); + while (d != null && !d.Equals(@"S:\", StringComparison.OrdinalIgnoreCase)) // No EC69, d is reassigned in the loop + d = Path.GetDirectoryName(d); } } diff --git a/ecoCode-csharp-test-project.csproj b/ecoCode-csharp-test-project.csproj index e545990..34ed2ba 100644 --- a/ecoCode-csharp-test-project.csproj +++ b/ecoCode-csharp-test-project.csproj @@ -15,7 +15,7 @@ - +