Skip to content

Commit d54ba3e

Browse files
authored
ci(jscpd): add hint message for rebasing on false negatives aws#6564
## Problem The duplicate code detection can fail when the current branch is not rebased with the most recent version of master. This is a fairly common false-negative. To avoid this, the PR must be kept up to date with its target branch. However, the tool doesn't provide any hints/indication this is the case. ## Solution - add a hint message on failure that suggests rebasing.
1 parent 151b85b commit d54ba3e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/filterDuplicates.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ async function run() {
111111
console.log('%s duplicates found', filteredDuplicates.length)
112112
if (filteredDuplicates.length > 0) {
113113
console.log(formatDuplicates(filteredDuplicates, commitHash, repoName))
114+
console.log(
115+
'* Hint: if these duplicates appear unrelated to the changes, rebase onto the latest target branch.'
116+
)
114117
process.exit(1)
115118
}
116119
}

0 commit comments

Comments
 (0)