Repository navigation
Conversation
…ranch Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a CI check that fails a PR on duplicated code.
The check
code-duplicationjob runs jscpd 5.4.3 on TypeScript, TSX, Kotlin and Swift.main,devorstableis compared with its parent commit.app,screens,ui,__tests__,__mocks__,.storybook,scripts,visual,android/app/srcandios.devholds 249 clones today (2.89% of 126,038 lines). The check accepts those 249 clones as the baseline. An edit that moves one of them makes it a new clone, and the job fails until the edit removes it.Commands
yarn dupes zingolabs/devruns the check locally.yarn dupes:reportlists each clone in the tree.Tests
__tests__/codeDuplicationGate.unit.tsholds five tests. They pin the zero-clone limit, the two thresholds, the ignore list, the fail-all wiring and the baseline argument.I ran the check locally on two trees. The clean tree exits 0. A tree with one copied file reports
1 newand exits 1.tsc,eslint,prettier --check,depcheckand all 284 Jest suites pass locally.After the merge
An administrator must add
code-duplication / jscpdto the required status checks ofdev. Until then the job fails the run but branch protection does not require it.🤖 Generated with Claude Code