Skip to main content

Module dead_parameter

Module dead_parameter 

Source
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§

DeadParameterFinding
Serializable per-file finding for the dead-parameter rule.
DeadParameterRule
Rule that flags function parameters never referenced in their function body.

Functions§

build_dead_parameter_report
Build a DiagnosticsReport for the dead-parameter rule.