ctx_smells Analysis & Navigation Code smell detection (Property Graph). Actions: scan|summary|rules|file. 8 rules: dead_code, long_function, long_file, god_file, fan_out_skew, duplicate_definitions, untested_function, cyclomatic_complexity. Optional: format=text|json.
✓ When to Use
Detecting code smells like long functions, deep nesting, and high complexity. Uses property graph for dependency-aware scoring.
✗ When Not to Use
When you need detailed AST analysis (use ctx_outline) or dependency graphs (use ctx_architecture).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
action | "scan" | "summary" | "rules" | "file" | Yes | Smell operation (default: summary) |
format | "text" | "json" | No | Output format (text or json) |
path | string | No | Filter by file path (optional) |
root | string | No | Project root (default: .) |
rule | string | No | Filter by rule name (optional, for scan) |
Actions
scan ctx_smells action="scan"
summary ctx_smells action="summary"
rules ctx_smells action="rules"
file ctx_smells action="file"
CLI Equivalent
This tool is also available via the CLI:
lean-ctx smells [scan|summary|rules|file] [--rule=<r>] [--path=<p>] [--json] Related Tools
a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6 ← Back to all tools