technical-debt-radar 1.13.1 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +21 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22330,6 +22330,27 @@ ${relativePath} (${fileViolations.length} violations)
|
|
|
22330
22330
|
if (options.dryRun) {
|
|
22331
22331
|
console.log(import_chalk4.default.dim(" [dry-run] Would apply this fix"));
|
|
22332
22332
|
totalSkipped += lineViolations.length;
|
|
22333
|
+
} else if ((applyAll || options.auto) && fix.multiFile && fix.filesToChange?.length) {
|
|
22334
|
+
console.log(import_chalk4.default.magenta(` Auto multi-file fix (${fix.filesToChange.length + 1} files)...`));
|
|
22335
|
+
try {
|
|
22336
|
+
await handleMultiFileFix(
|
|
22337
|
+
client,
|
|
22338
|
+
lineViolations[0],
|
|
22339
|
+
absPath,
|
|
22340
|
+
projectRoot,
|
|
22341
|
+
framework,
|
|
22342
|
+
scanResult.config?.architecture,
|
|
22343
|
+
fix.filesToChange,
|
|
22344
|
+
options
|
|
22345
|
+
);
|
|
22346
|
+
totalFixed += lineViolations.length;
|
|
22347
|
+
} catch (e) {
|
|
22348
|
+
console.log(import_chalk4.default.red(` Multi-file fix failed: ${e instanceof Error ? e.message : e}`));
|
|
22349
|
+
totalFailed += lineViolations.length;
|
|
22350
|
+
}
|
|
22351
|
+
fileContent = await fs5.readFile(absPath, "utf-8");
|
|
22352
|
+
lines = fileContent.split("\n");
|
|
22353
|
+
continue;
|
|
22333
22354
|
} else if (applyAll || options.auto) {
|
|
22334
22355
|
shouldApply = true;
|
|
22335
22356
|
if (!options.auto) console.log(import_chalk4.default.green(" Auto-applying (all)..."));
|