mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
BUGFIX: API break detector does not detect affected code in some cases (#2172)
This commit is contained in:
@@ -58,7 +58,10 @@ function detectImpactAndMigrateLines(script: Script, brokenFunctions: APIBreakIn
|
||||
const lines = script.content.split("\n");
|
||||
for (let i = 0; i < lines.length; ++i) {
|
||||
for (const brokenFunction of brokenFunctions) {
|
||||
if (!lines[i].includes(brokenFunction.name)) {
|
||||
if (
|
||||
!lines[i].includes(brokenFunction.name) &&
|
||||
(!brokenFunction.migration || !lines[i].match(brokenFunction.migration.searchValue))
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
impactedLines.push(i + 1);
|
||||
|
||||
Reference in New Issue
Block a user