Skip to content

refactor(pre-commit): not running jscpd anymore #4710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 12, 2025

Conversation

mfranzke
Copy link
Collaborator

@mfranzke mfranzke commented Aug 9, 2025

Proposed changes

jscpd causes a 10-second delay to a Git commit because it needs to parse the entire codebase to detect any copied and pasted code. Since we are already doing this within the pipeline, we should skip it on localhost due to the significant delay.

Resolves #3018

Types of changes

  • Bugfix (non-breaking change that fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improvements to existing components or architectural decisions)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Further comments

`jscpd` leads to a 10 seconds delay of a git commit, as it needs to parse through the whole codebase to detect any copy&paste code parts. As we're doing within the pipeline even already, we should skip it on localhost due to this massive delay.
@mfranzke mfranzke self-assigned this Aug 9, 2025
@mfranzke mfranzke requested a review from nmerget as a code owner August 9, 2025 06:00
@mfranzke mfranzke added the 🍄🆙improvement New feature or request label Aug 9, 2025
@mfranzke mfranzke enabled auto-merge (squash) August 9, 2025 06:01
Copy link
Contributor

github-actions bot commented Aug 9, 2025

@mfranzke mfranzke moved this to 👀 In review in UX Engineering Team Backlog Aug 9, 2025
@mfranzke mfranzke removed their assignment Aug 9, 2025
@mfranzke mfranzke changed the title refactor(pre-commit): not running jscpd anymore refactor(pre-commit): not running jscpd anymore Aug 12, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the jscpd (JavaScript Copy Paste Detector) tool from the pre-commit hook to improve local development experience by eliminating a 10-second delay during Git commits. The change maintains code quality by keeping the duplicate code detection in the CI pipeline.

  • Removes npm run lint:jscpd from the pre-commit hook
  • Improves developer experience by reducing commit time

@mfranzke mfranzke merged commit f5f2917 into main Aug 12, 2025
54 checks passed
@mfranzke mfranzke deleted the refactor-pre-commit-not-running-jscpd-anymore branch August 12, 2025 10:57
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in UX Engineering Team Backlog Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍄🆙improvement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

evaluate to optimize lint:jscpd for lint-staged
2 participants