The SmellGPT is a Visual Studio Code (VSCode) extension designed to identify code smells in your codebase. A 'smell' in the context of programming refers to certain patterns in the code that could indicate a deeper problem.
Features
Uses an API to find up to five code smells in your code
Provides four modes: Sober, Drunk, BFF, and Khorne, which control the type of feedback received
Utilizes OpenAI to generate prompts
Can highlight beautiful as well as problematic code sections
Setup
Install the SmellGPT extension in VSCode
Set the API key in the VSCode settings under the smellgpt configuratio
Choose the mode of operation by clicking on the pig nose (🐽) in the status bar
Modes
Sober - Provides standard code smell identification
Drunk - Delivers feedback in a somewhat dismissive and passive-aggressive tone. Occasionally appreciates beautiful code
BFF - Identifies code smells in a friendly, encouraging way, and frequently points out beautiful code
Khorne - Provides feedback in an overly aggressive, borderline psychopathic manner
Note: Each mode's messaging tone is implemented via different prompts fed into an OpenAI model. The model is also configured to handle code parsing errors, in which case it generates a generic smell.
Contributing
The project is open-source and contributions are welcome. Please make sure to update tests as appropriate.