# Code Smells Review Lens

Review the provided code for **code smells and readability issues**.

## What to Look For

### Control Flow Smells
- Deep nesting (if inside if inside if...)
- Complex boolean expressions without named variables
- Early returns that could simplify flow vs. arrow code
- Switch/match statements that should be polymorphism or lookup tables

### Data Smells
- Primitive obsession (passing 5 strings instead of an object)
- Data clumps (same group of variables passed together repeatedly)
- Feature envy (function uses another module's data more than its own)
- Mutable state where immutable would work

### Naming & Clarity
- Names that lie (function does more/less than name suggests)
- Abbreviated names that obscure meaning
- Generic names (data, info, result, tmp, val)
- Inconsistent naming conventions within the file

### Structure Smells
- Comments that explain "what" instead of "why" (code should be self-documenting)
- Dead parameters (passed but never used)
- Flag arguments (boolean that changes function behavior)
- Speculative generality (abstraction without current need)

## Output Format

For each finding:
```
[SMELL] <severity:HIGH|MED|LOW> <file:line>
Smell: <name of the smell>
Issue: <what's wrong>
Suggest: <refactoring technique - extract method, rename, introduce parameter object, etc.>
```

## Guidelines

- Reference established refactoring patterns (Fowler's catalog) when applicable
- Distinguish style preferences from genuine smells
- Consider the language idioms (what's a smell in Java may be fine in Python)
- HIGH = actively misleading or bug-prone, MED = maintainability drag, LOW = polish
