From 6a036f4e84b84f64396c949c135c08000bb3646d Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 3 Jul 2024 12:45:47 +0200 Subject: [PATCH] Improve code quality --- csharp/extractor/Semmle.Extraction/FilePattern.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/csharp/extractor/Semmle.Extraction/FilePattern.cs b/csharp/extractor/Semmle.Extraction/FilePattern.cs index 8ab9fcd142cd..8c8e190a3ced 100644 --- a/csharp/extractor/Semmle.Extraction/FilePattern.cs +++ b/csharp/extractor/Semmle.Extraction/FilePattern.cs @@ -80,15 +80,15 @@ bool HasCharAt(int i, Predicate p) => if (i + 2 < pattern.Length) { // Processing .../**/... + // ^^^ sb.Append("(.*/|)"); i += 3; } else { - // Processing .../** - sb.Append(".*"); - // There's no need to add another .* to the end outside the loop, we can return early. - return sb; + // Processing .../** at the end of the pattern. + // There's no need to add .* because it's anyways added outside the loop. + break; } } else