Extension to Identify Duplicate Code
This extension is designed to identify duplicate object definitions within your codebase. It scans your project for redundant:
- Method bodies
- File contents
- Interface declarations
- Enum structures
- CSS class definitions
Features
1. Tree View Listing
Organizes and displays duplicate items in a categorized tree view:
- Identical CSS rules
- Duplicate interface definitions
- Repeated enum structures
- Similar method bodies
2. File Navigation
- Click on an item in the tree view to open the corresponding file.
- Automatically positions the cursor at the duplicate definition.
3. Manual Refresh
- Use the refresh button located at the top of the tree view to re-scan your project after making changes.
4. Automatic Exclusion
- Automatically ignores files in:
- The
node_modules directory.
- Any directory prefixed with a dot (
. ), such as .git .
5. Set Root Directory
- Configure the root directory for analysis through the settings menu.
6. Directory Exclusion
- Specify additional directories to exclude from the analysis using the extension settings.
7. Duplicate Detection by Type
- CSS Rules: Detects duplicate styles across
.css , .scss , and .less files.
- Enums: Identifies duplicate enums within
.ts and .tsx files.
- Interfaces: Flags repeated interface definitions in
.ts and .tsx files.
- Methods: Groups duplicate methods found in
.js , .jsx , .ts , and .tsx files (excluding lifecycle methods).
- File Contents: Detects identical files across all supported file types.
8. Detailed Counts
- Provides a summary count of duplicate items grouped by type.
Installation
Usage
| |