Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>PyCSDNew to Visual Studio Code? Get it now.
PyCSD

PyCSD

LordStarship

| (0) | Free
Real-time Long Method, Long Parameter List, and Large Class detection for Python using a trained Random Forest classifier.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Python Code Smell Detector

Detects Long Method, Long Parameter List, and Large Class code smells in Python files in real-time using a trained Random Forest classifier.

What it does

  • Underlines the function or class name in yellow when a smell is detected
  • Hover over the underline to see the smell type, metric value, and confidence score
  • Click "Show Refactoring Example" in the tooltip to open a side-by-side unsaved Python file with before/after refactoring examples specific to that smell
  • A lightbulb code action also appears on flagged lines
  • Runs automatically on file save

Setup (required before first use)

1 — Install Python dependencies

pip install joblib pandas numpy scikit-learn

2 — Place your data files

After installing the extension, navigate to its python/ folder (see README_DATA.txt inside that folder for the exact path on your OS) and place the following files there:

LongMethod_YesNo.csv
LongParameterList_YesNo.csv
LargeClass_cohesion_YesNo.csv

Optionally also place pre-trained model files to skip first-run training:

longmethod_lrfs_rf_model.joblib
longparameterlist_lrfs_rf_model.joblib
largeclass_lrfs_rf_model.joblib

3 — Configure Python path if needed

Open Settings (Ctrl+,) and search for Code Smell Detector. Set codeSmellDetector.pythonPath to your Python executable if python is not on your PATH.

Settings

Setting Default Description
codeSmellDetector.pythonPath python Python executable path
codeSmellDetector.analyzeOnSave true Analyse on every save
codeSmellDetector.confidenceThreshold 0.5 Minimum confidence to flag (0–1)
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft