Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/duplicate-code-detector.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,20 @@ Create separate issues for each distinct duplication pattern found (maximum 3 pa
- Limit to the top 3 most significant patterns if more are found
- Use the `create_issue` tool from safe-outputs MCP **once for each pattern**

**When No Issues Are Found**:

**YOU MUST CALL** the `noop` tool when analysis completes without finding significant duplication:

```json
{
"noop": {
"message": "✅ Duplicate code analysis complete. Analyzed [N] files changed recently. No significant duplication detected (threshold: >10 lines or 3+ similar patterns)."
}
}
```

**DO NOT just write this message in your output text** - you MUST actually invoke the `noop` tool. The workflow will fail if you don't call either `create_issue` or `noop`.

**Issue Contents for Each Pattern**:
- **Executive Summary**: Brief description of this specific duplication pattern
- **Duplication Details**: Specific locations and code blocks for this pattern only
Expand Down Expand Up @@ -231,6 +245,7 @@ For each distinct duplication pattern found, create a separate issue using this
- Suggest practical refactoring approaches
- Assign issue to @copilot for automated remediation
- Use descriptive titles that clearly identify the specific pattern (e.g., "Duplicate Code: Error Handling Pattern in Parser Module")
- **If no significant duplication found, call `noop` tool** - never complete without calling either `create_issue` or `noop`

## Tool Usage Sequence

Expand Down