You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci(lint): run jscpd in CI, compare to static threshold. (#5833)
## Problem
New contributors often copy-paste logic and test cases, which creates a
maintenance cost for little gain.
Examples
-
#3837 (comment)
-
#3805 (comment)
We call these repeated segments of code "clones".
## Solution
implement a static threshold.
Run `jscpd` in CI and compare the % duplicated to a fixed threshold of
1.34%, which is the current duplication rate in the repo.
The main issue with this solution is that it fails to provide easy
debugging options when new duplicates are found. Currently exploring
adding this functionality in a follow-up.
#### Notes
- this is a summary of the problem/solution. For full information, see
full doc (VSCode: Detecting and Reducing Duplicate Code) describing
changes.
---
<!--- REMINDER: Ensure that your PR meets the guidelines in
CONTRIBUTING.md -->
License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
---------
Co-authored-by: Justin M. Keyes <[email protected]>
0 commit comments