Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Analysis/Problem/Forge/ModDependencyProblem.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public static function getPatterns(): array
'requires-mods' => '/The mod \S+ \(([^\)]+)\) requires mods \[([^\]]+)\] to be available/',
'missing-mods-exception' => '/net\.minecraftforge\.fml\.common\.MissingModsException: Mod \S+ \((.+)\) requires (.+)/',
'mod-loading-exception' => '/net\.minecraftforge\.fml\.ModLoadingException: Mod §.([^§]+)§. requires §.([^§]+)§. §.([^ §]+)[^§]*§./',
'loading-failed-exception' => '/net\.minecraftforge\.fml\.LoadingFailedException: Loading errors encountered: \[\n(?:.*\n)*Mod §.([^§]+)§. requires §.([^§]+)§. §.([^ §]+)[^§]*§./'
// whole lines are skipped possessively, so a long stack trace doesn't exhaust the backtrack limit
'loading-failed-exception' => '/net\.minecraftforge\.fml\.LoadingFailedException: Loading errors encountered: \[\n(?:.*+\n)*Mod §.([^§]+)§. requires §.([^§]+)§. §.([^ §]+)[^§]*§./'
];
}

Expand Down
2 changes: 0 additions & 2 deletions test/tests/Performance/PatternSafetyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Aternos\Codex\Analysis\PatternInsightInterface;
use Aternos\Codex\Minecraft\Analysis\Problem\Bukkit\ChunkLoadExceptionProblem;
use Aternos\Codex\Minecraft\Analysis\Problem\Forge\ClientOnlyModProblem;
use Aternos\Codex\Minecraft\Analysis\Problem\Forge\ModDependencyProblem;
use Aternos\Codex\Minecraft\Analysis\Problem\Forge\ModFatalProblem;
use Aternos\Codex\Minecraft\Analysis\Problem\Paper\ServerJarInPluginFolderProblem;
use Aternos\Codex\Minecraft\Test\Logs\TestLog;
Expand Down Expand Up @@ -78,7 +77,6 @@ class PatternSafetyTest extends TestCase
protected const array KNOWN_UNSAFE_PATTERNS = [
ChunkLoadExceptionProblem::class => [0, 1, 2],
ClientOnlyModProblem::class => [0],
ModDependencyProblem::class => ["loading-failed-exception"],
ModFatalProblem::class => ["failed-to-load"],
ServerJarInPluginFolderProblem::class => [0],
];
Expand Down
Loading