Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>Code Duplicate DetectorNew to Visual Studio Code? Get it now.
Code Duplicate Detector

Code Duplicate Detector

Minidu Shashimal Aluthge

|
44 installs
| (0) | Free
Finds duplicate code blocks across your project and suggests consolidation
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Code Duplicate Detector

A powerful VS Code extension that finds duplicate code blocks across your project and suggests consolidation opportunities.

Features

  • Smart Detection: Uses AST parsing for JavaScript/TypeScript and line-based analysis for other languages
  • Configurable Similarity: Adjust similarity thresholds to find exact or near-duplicate code
  • Multiple Views: Tree view for quick navigation and detailed webview report
  • File Navigation: Click to jump directly to duplicate code locations
  • Customizable Patterns: Configure which files to include/exclude from scanning

Usage

  1. Scan Workspace: Use Ctrl+Shift+P and search for "Scan for Duplicate Code"
  2. View Results: Check the "Duplicate Code" panel in the Explorer sidebar
  3. Detailed Report: Click the preview icon to open a comprehensive HTML report
  4. Navigate: Click on any file in the results to jump to the duplicate code

Configuration

Access settings via File > Preferences > Settings and search for "Code Duplicate Detector":

  • minLines: Minimum number of lines for duplicate detection (default: 5)
  • similarity: Similarity threshold 0.1-1.0 (default: 0.8)
  • excludePatterns: File patterns to exclude from scanning
  • includePatterns: File patterns to include in scanning

Commands

  • Scan for Duplicate Code: Start scanning the workspace
  • Clear Results: Clear all duplicate detection results
  • Show Duplicate Report: Open detailed HTML report

Supported Languages

  • JavaScript (.js)
  • TypeScript (.ts)
  • React (.jsx, .tsx)
  • Python (.py)
  • Java (.java)
  • C/C++ (.c, .cpp)
  • C# (.cs)

Installation

  1. Install from VS Code Marketplace
  2. Or install manually:
    code --install-extension code-duplicate-detector-1.0.0.vsix
    
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft