mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Improve code quality
This commit is contained in:
@@ -80,15 +80,15 @@ namespace Semmle.Extraction
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user