The idea
A function-level lint pass that flags functions which are technically defined but practically landmines: no docstring, no clear contract, or a signature that lies about what it returns.
Why it matters
"Defined" and "actually defined" are different things. A function named validate_user with no docstring and a bare -> bool that always returns True is a trap for both humans and agents. Surfacing these makes the graph a quality signal, not just a map.
Sketch of an approach
Node already carries signature and docstring in codegraph/graph/schema.py, so this is largely a query-and-report pass over existing graph data — no new extraction required to start.
- Start with cheap, high-signal rules: missing docstring on a public function; return annotation present but no
return in the body; parameter documented that no longer exists.
- Emit findings in the same shape as existing analysis outputs (see
codegraph/analysis/).
Acceptance criteria
Part of the build-in-public roadmap. Good first issue — mostly reads existing graph data. Discussed on LinkedIn (link to follow).
The idea
A function-level lint pass that flags functions which are technically defined but practically landmines: no docstring, no clear contract, or a signature that lies about what it returns.
Why it matters
"Defined" and "actually defined" are different things. A function named
validate_userwith no docstring and a bare-> boolthat always returnsTrueis a trap for both humans and agents. Surfacing these makes the graph a quality signal, not just a map.Sketch of an approach
Nodealready carriessignatureanddocstringincodegraph/graph/schema.py, so this is largely a query-and-report pass over existing graph data — no new extraction required to start.returnin the body; parameter documented that no longer exists.codegraph/analysis/).Acceptance criteria
Part of the build-in-public roadmap. Good first issue — mostly reads existing graph data. Discussed on LinkedIn (link to follow).