PyDup Detector is a Visual Studio Code extension that helps you detect duplicate code and find Python code gems using similarity analysis.
- Send the selected code for similarity analysis.
- View similar functions and their details directly in the code editor.
- Install the extension from the Visual Studio Code Marketplace.
- Configure the extension settings to customize your analysis.
- Open a Python file in Visual Studio Code.
- Select the code you want to analyze.
- Use the command palette (Shift + Cmd + X on macOS, Shift + Ctrl + X on Windows/Linux) and run the command "PyDup Detector: Send the selected code for analysis."
- Similar functions will be displayed as CodeLens above the selected code.
- Click on the CodeLens items to view more details or additional results.
The extension provides the following configuration settings:
- API Endpoint: Set the API endpoint for PyDup Detector.
- Match Threshold: Define the minimum match rate for found similar functions.
- Keybinding: Configure the keybinding for sending selected code.
- Usable Libraries: List of usable libraries installed on the server for analysis.
- Used Libraries: List of libraries used for analysis.
- Search Type: Choose between "AI model" (pre-trained model using usable libraries) and "AST based search" (looking for similar functions by the Abstract Syntax Tree of your code and the libraries).
- PyDup Detector: Send the selected code for analysis: Send the currently selected code for similarity analysis.
- View more results: View additional results when there are more than three similar functions.
Please check the GitHub repository for any known issues.
For information about the latest updates and release notes, refer to the CHANGELOG file.
If you encounter issues or have suggestions, please open an issue on the GitHub repository. Contributions are welcome!
This extension is licensed under the MIT License.