Analyzer::Go::Chi
Inherits Analyzer::Go::GoTestPath < Analyzer < FileHelper < Reference < Object
Constants
Go enforces per-file imports, so any file using chi's router types must mention the package path. Filter on this marker to avoid touching the bulk of files in projects whose detection matched on a single dummy/fixture file (the chi extractor is loose enough that another framework's verb calls would otherwise surface as chi routes).
Whole-file gates, run on every .go in the tree.
Nested Mount calls inside a mounted router are followed to this
depth; deeper trees are almost certainly a cycle through a symbol
the resolver could not tell apart.
A function that takes a router parameter (func addGitRoutes(m *web.Router, ...)): candidate route helper, by name, per directory.
Class methods
Instance methods
Extracts endpoints from a router function definition declared in
the Go package at dir, searching every .go file there.
Uses the tree-sitter walker, scoped down to just the target
function's declaration so the returned routes are relative to the
function body — the caller slaps on the Mount prefix. When
recv_type is given, the target is a method (func (r Type) Name())
and only the declaration on that receiver type is matched.
.Mount(...) calls inside the body are expanded recursively with
their own prefix, so apiRouter() mounting usersRouter() at
/users yields /users/... relative to apiRouter's root. The
ancestors list guards against a router that (transitively)
mounts itself.
Instance-side view of the same declaration. The per-file rescues live on
this base class, which has no way to name the analyzer that is running
inside them, so a skipped file could not be attributed to a tech.
Deriving it from analyzer_for keeps the name written exactly once.