Implement the 015-add-jscpd-gate feature that adds copy-paste detection to the quality gate using jscpd with a 5% duplication threshold integrated into pnpm check

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lukas
2026-03-06 00:13:32 +01:00
parent 56bced8481
commit 2793a66672
11 changed files with 1183 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
# Data Model: Copy-Paste Detection Quality Gate
This feature introduces no new domain entities, application state, or data persistence. It is a purely tooling/configuration feature.
## Configuration Entities
### jscpd Configuration (`.jscpd.json`)
- **threshold**: Maximum allowed duplication percentage (numeric, 0-100)
- **minLines**: Minimum number of lines for a block to be considered a duplicate (positive integer)
- **minTokens**: Minimum number of tokens for a block to be considered a duplicate (positive integer)
- **pattern**: Glob patterns for files to include in the scan (string array)
- **ignore**: Glob patterns for files/directories to exclude from the scan (string array)
- **reporters**: Output format for duplication reports (string array)
No state transitions, no relationships to existing domain entities.