nori/codegen/scan

Does generated code mention a name?

Both the TypeScript import lists and the Gleam query helpers are filtered by what the emitted body actually references: an unused import or an unused private function is a warning in the consumer’s build, in a file they are told not to edit. Neither can use a plain substring test — Issue must not be kept alive by IssueDetail, and query_list is a substring of query_required_list.

Values

pub fn references(body: String, name: String) -> Bool

True if body mentions name as a whole identifier.

Boundary-checked on both sides, so a longer identifier that merely contains name does not count. Matches a call (f(x)), a value passed along (g(_, f)), and a type annotation alike, which is why it does not look for any particular punctuation.

Search Document