Expand description
dead-parameter native rule — flags function parameters never referenced in the function body.
Uses tree-sitter locals.scm queries (via normalize-scope) to find parameters
defined with @local.definition.parameter that have no resolved reference in the
same file. Underscore-prefixed names (_, _unused) are excluded — those are the
conventional way to mark intentionally unused parameters.
§Language support
Requires @local.definition.parameter captures in the language’s locals.scm.
Currently supported: Rust, Python, JavaScript, TypeScript, TSX, Go, Java, C, C++, C#.
Languages without this capture are silently skipped.
Structs§
- Dead
Parameter Finding - Serializable per-file finding for the dead-parameter rule.
- Dead
Parameter Rule - Rule that flags function parameters never referenced in their function body.
Functions§
- build_
dead_ parameter_ report - Build a
DiagnosticsReportfor thedead-parameterrule.