deflake 1.2.1 → 1.2.2
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/cli.js +8 -3
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -800,9 +800,12 @@ async function analyzeFailures(artifacts, fullLog, client) {
|
|
|
800
800
|
const key = `${locId}|${fixCode.trim()}`;
|
|
801
801
|
|
|
802
802
|
if (!groups[key]) {
|
|
803
|
-
groups[key] = { ...res, count: 0 };
|
|
803
|
+
groups[key] = { ...res, count: 0, locations: [] };
|
|
804
804
|
}
|
|
805
805
|
groups[key].count++;
|
|
806
|
+
if (res.location) {
|
|
807
|
+
groups[key].locations.push(res.location);
|
|
808
|
+
}
|
|
806
809
|
}
|
|
807
810
|
|
|
808
811
|
const finalGroups = Object.values(groups);
|
|
@@ -811,9 +814,11 @@ async function analyzeFailures(artifacts, fullLog, client) {
|
|
|
811
814
|
console.log(`${C.GRAY}ℹ️ Suggested for ${group.count} similar failures:${C.RESET}`);
|
|
812
815
|
}
|
|
813
816
|
|
|
814
|
-
// APPLY FIX (
|
|
817
|
+
// APPLY FIX (To all instances in the group)
|
|
815
818
|
if (argv.fix) {
|
|
816
|
-
|
|
819
|
+
for (const loc of group.locations) {
|
|
820
|
+
await applySelfHealing({ ...group, location: loc });
|
|
821
|
+
}
|
|
817
822
|
}
|
|
818
823
|
|
|
819
824
|
printDetailedFix(group.fix, group.location, group.source_code, argv.fix);
|