Skip to content
Merged
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
5 changes: 4 additions & 1 deletion test/tests/Performance/PatternSafetyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
namespace Aternos\Codex\Minecraft\Test\Performance;

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\ModFatalProblem;
use Aternos\Codex\Minecraft\Analysis\Problem\Paper\ServerJarInPluginFolderProblem;
use Aternos\Codex\Minecraft\Analysis\Problem\Forge\ModDependencyProblem;
use Aternos\Codex\Minecraft\Test\Logs\TestLog;
use FilesystemIterator;
Expand Down Expand Up @@ -72,7 +76,6 @@ class PatternSafetyTest extends TestCase
* Which of them actually fails depends on whether PCRE JIT is enabled.
*/
protected const array KNOWN_UNSAFE_PATTERNS = [
ModDependencyProblem::class => ["loading-failed-exception"],
];

/**
Expand Down
Loading