Bear Sniffer
An extension for Sniffing out code smells like a Bear.
Helps improve your code quality by finding common code smells. Designed specifically for Python.
Intended to be used for beginner programmer students.
Features
Detect code smells in the current Python file and explains them.
- Finds what lines the smells occur
- Identifies the smell and categorises its severity
- Provides an explanation of why the smell is a problem
How to Use
- Open VS Code and make sure you are not in Restricted Mode (Trust the folder)
- Open the python file you want to sniff
- Hit
CTRL + SHIFT + P (or MacOS: CMD SHIFT P) or go to the search bar and type ">"
- Search for "Bear Sniff" and select it
- Repeat steps 2-3 each time you make changes to the file
List of Code smells detected
- Use of if statements when returning a boolean
- Usage of itteration on the length of a list instead of itterators
- Stacking if statements instead of using
and statements
- Having mutable default arguments for funcitons or classes
- Error handling by catching overly broad exceptions
- Use of an else statement for an if statement that will never fall through
- Overwriting default python names
- Boolean comparison against a constant boolean
- Functions of excessive length
- Dead Code
Requirements
Requires version 1.134.0 or greater of VSCode to use
Known Issues
Your code lol
2.0.0
Prototype release in order to get user testing for our project
| |