Skip to content

Commit 6a036f4

Browse files
committed
Improve code quality
1 parent b36db5a commit 6a036f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

csharp/extractor/Semmle.Extraction/FilePattern.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ bool HasCharAt(int i, Predicate<char> p) =>
8080
if (i + 2 < pattern.Length)
8181
{
8282
// Processing .../**/...
83+
// ^^^
8384
sb.Append("(.*/|)");
8485
i += 3;
8586
}
8687
else
8788
{
88-
// Processing .../**
89-
sb.Append(".*");
90-
// There's no need to add another .* to the end outside the loop, we can return early.
91-
return sb;
89+
// Processing .../** at the end of the pattern.
90+
// There's no need to add .* because it's anyways added outside the loop.
91+
break;
9292
}
9393
}
9494
else

0 commit comments

Comments
 (0)