-
Notifications
You must be signed in to change notification settings - Fork 1
Configuration
The Filter Smells panel offers granular control over what gets detected and how:

-
Smell Type Toggles:
Simple on/off switches for each of the eight supported smell types:- Cache Repeated Calls
- Long Lambda Functions
- Use A Generator
- Long Element Chain
- Member Ignoring Method
- Long Message Chain
- String Concatenation in Loop
- Long Parameter List
-
Threshold Adjustments:
For five configurable smells, interactive controls let you set detection sensitivity:- Cache Repeated Calls: Minimum identical calls to trigger (default: 3)
- Long Element Chain: Minimum chain length (default: 4)
- Long Lambda Functions: Minimum character length (default: 50)
- Long Message Chain: Minimum call chain length (default: 5)
- Long Parameter List: Minimum parameters (default: 5)

-
Preset Management:
Convenience buttons at the panel bottom provide:- "Select All": Enable all smell types
- "Deselect All": Disable all detection
- "Reset Defaults": Restore factory settings

Consider these strategies when setting up your detection:
-
Project Phase Adjustments:
- Early Development: Enable all smells with lower thresholds for strict quality control
- Maintenance Phase: Focus on high-impact smells with higher thresholds
-
Team Standards Alignment:
Configure thresholds to match your organization's style guide requirements -
Performance Tradeoffs:
Lower thresholds increase detection accuracy but may slightly impact analysis speed on large codebases
All filter settings persist between VS Code sessions and are workspace-specific, allowing different configurations for different projects.
EcoOptimizers offers multiple ways to personalize how code smells appear in your editor:

-
Highlight Style Selection:
Accessible through VS Code settings (File > Preferences > Settings > Extensions > EcoOptimizers), choose from three visual treatments:- Underline: Traditional squiggly underline (default)
- Flashlight: Subtle background highlight with fading edges
- Border-Arrow: Left border indicator with hover-triggered annotation
-
Color Customization:
The extension provides two complementary approaches to color configuration:Per-Smell Coloring:
- Edit the "Smell Colours" table to assign specific colors to each smell type
- Uses standard CSS color values (hex, rgb, or named colors)
- Example:
"Long Lambda Functions": "#FFA500"for orange
Uniform Coloring:
- Enable "Use Single Colour" to apply one color to all smell types
- Set the universal color in "Single Highlight Colour"
- Useful for simplified visual parsing
-
Accessibility Considerations:
The default color palette is designed for color vision deficiency awareness. When customizing, ensure sufficient contrast with your theme's background.
All customization options are available through:
- The standard VS Code Settings UI (GUI editor)
- Direct editing of settings.json
- Workspace-specific configuration files
Changes take effect immediately without requiring restart, allowing real-time experimentation with different visual styles.