Code Depth
Code Depth is a VS Code extension that indicates the "logical depth" of your functions directly in the editor. By calculating the maximum execution path of your code, it helps you identify deeply nested logic and potential refactoring targets at a glance. 🚀 Features
🧠 How Depth is Calculated The extension uses a recursive algorithm to traverse the Outgoing Call Hierarchy. To prevent performance lag and infinite loops, the search stops at a maximum depth of 5. The "High Fan-In" Heuristic To avoid "analysis paralysis" on common utility functions, the extension applies the following rule: If a function has more than 5 incoming calls, it is treated as a stable abstraction.The drill-down stops there because high-frequency functions are typically well-tested utilities that do not contribute to the unique complexity of the specific feature you are currently analyzing. 🛠 Installation & Usage
🛡️ Requirements Language Server: This extension relies on the vscode.prepareCallHierarchy command. Ensure you have a language extension installed (e.g., the Microsoft Python extension). |
