Skip to content

Commit 5794607

Browse files
committed
log commit order warnings
Signed-off-by: shmck <[email protected]>
1 parent 907d283 commit 5794607

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/utils/commitOrder.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ export function validateCommitOrder(positions: string[]): boolean {
4646
previous = current;
4747
});
4848

49-
// TODO: log errors based on index
49+
if (errors.length) {
50+
console.warn("Found commit positions out of order");
51+
positions.forEach((position, index) => {
52+
if (errors.includes(index)) {
53+
console.warn(`${position} <-`);
54+
} else {
55+
console.log(position);
56+
}
57+
});
58+
}
5059
return !errors.length;
5160
}

0 commit comments

Comments
 (0)