AST Anti-Pattern Slayer

Parses Python or JavaScript-style source into an AST, computes cyclomatic complexity v(G) as decision count plus one, maximum block nesting depth, bare except clauses and unreachable dead code, then uses a conservative ast.NodeTransformer to rewrite trailing if/else wrappers into semantics-preserving early return and continue guard clauses, emitting a structured JSON diagnostics report with file line and column locations.

RMAzrim Updated

File contents

RMAzrim/opencode-artes/tree/main/docs/skills/ast-anti-pattern-slayer commit 0d2d3de0f0

Frequently asked questions

npx skillmds@latest add rmazrim/ast-anti-pattern-slayer