-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Audit: Code Complexity & Maintainability
Analyse code quality and identify maintainability issues.
Complexity Metrics
-
Cyclomatic Complexity
- Functions with complexity > 10
- God classes/functions
- Deeply nested conditionals
-
Cognitive Complexity
- Hard-to-understand code
- Convoluted logic flows
- Magic numbers/strings
-
Code Duplication
- Copy-paste code
- Similar patterns that should be abstracted
- DRY violations
Maintainability Issues
- Long Methods - Functions > 50 lines
- Large Classes - Classes > 500 lines
- Deep Nesting - > 4 levels
- Parameter Lists - > 5 parameters
- Dead Code - Unused functions/variables
- Commented Code - Should be deleted
Code Smells
- Feature envy
- Data clumps
- Primitive obsession
- Inappropriate intimacy
- Refused bequest
- Speculative generality
Recommendations
For each finding, suggest:
- Refactoring approach
- Design pattern to apply
- Code example of improvement
Output
Save to AUDIT-COMPLEXITY.md
Prioritize by impact on maintenance burden.