Merged
Conversation
- Configure dupl linter with tiered thresholds: - 75 tokens in lint (blocks CI on serious duplication) - 50 tokens in `mise run dup` (advisory, with summary) - Add mise tasks: `dup` (comprehensive + summary), `dup:staged` - Document duplication prevention workflow in CLAUDE.md The go:discover-related skill was also created at ~/.claude/skills/ for pre-implementation code discovery. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Entire-Checkpoint: 51a265047d72
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive code duplication detection tooling with tiered thresholds to prevent duplicate code in the codebase.
Changes:
- Configures the
dupllinter (already enabled) with a 75-token threshold in.golangci.yamlfor CI enforcement - Adds
mise run duptask for comprehensive duplication checking at a more sensitive 50-token threshold with file-grouped summary output - Adds
mise run dup:stagedtask for quick pre-commit duplication checks on staged files - Documents the duplication prevention workflow in CLAUDE.md with clear guidance on thresholds and remediation steps
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.golangci.yaml |
Adds dupl linter settings with 75-token threshold for CI gate |
mise.toml |
Adds two new tasks: dup (comprehensive check with JSON summary) and dup:staged (quick pre-commit check) |
CLAUDE.md |
Documents duplication detection commands, tiered thresholds, and remediation workflow |
- Quote $staged variable using printf/xargs for safer filename handling - Clarify in description that dup:staged uses threshold 75 (same as CI) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Entire-Checkpoint: 92d119290bc7
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
- Use temp directory approach instead of $(mktemp).yaml to avoid orphan temp files (works on both Linux and macOS) - Use null-delimited pipeline throughout dup:staged to properly handle filenames with spaces Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Entire-Checkpoint: c169380f5523
gtrrz-victor
approved these changes
Jan 27, 2026
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.
Summary
dupllinter with tiered thresholds for code duplication detectionmise run duptask for comprehensive duplication checking with file summaryTiered Thresholds
mise run lintmise run dupTest plan
mise run dupshows duplication summary grouped by filemise run lintpasses (no new duplication)🤖 Generated with Claude Code
Note
Introduces code duplication detection across the repo with tiered thresholds and supporting tasks.
duplin.golangci.yamlwith a 75-token threshold for CI/new issuesmise run dup(50-token advisory, JSON summary by file) anddup:staged(staged files, 75-token) tasks inmise.tomlCLAUDE.mdWritten by Cursor Bugbot for commit 64fd725. This will update automatically on new commits. Configure here.