fix(quality): resolve reliability findings on dev

The Sonar quality gate rated new code D. Preserve focus and keyboard interaction through native controls and shared dialog behavior. Replace ambiguous regex scans with bounded parsing and make numeric coercion and initialization explicit.
This commit is contained in:
Maurice
2026-12-01 21:06:05 +01:00
parent 0d6a432967
commit e539860530
127 changed files with 548 additions and 338 deletions
+8 -5
View File
@@ -363,11 +363,14 @@ function migrationNamesFromCopy(script: string): string[] {
return match !== null && !isPluginSchemaName(match[1] ?? '');
});
if (copy < 0) return [];
const columns =
/\(([^)]*)\)/
.exec(lines[copy])?.[1]
.split(',')
.map((column) => column.trim()) ?? [];
const header = lines[copy];
const start = header.indexOf('(') + 1;
const end = header.indexOf(')', start);
if (end === -1) return [];
const columns = header
.slice(start, end)
.split(',')
.map((column) => column.trim());
const nameAt = columns.indexOf('name');
if (nameAt < 0) return [];
const names: string[] = [];