[Feature Request]: linter rule for unused variables, generally #26172
Labels
area: Python bindings
For things related to chapel-py, chpl-language-server, chplcheck, etc.
area: Tools
type: Feature Request
We currently have several different "Unused*" rules in
chplcheck
.All of these rules have very similar logic to compute them, and could probably be refactored to a common rule. Even if we want to keep them as separate rules (although I don't know that there's much utility to that), they can at least share common code.
From that mindset, these all have the same theme: "unused var-like thing". However, we don't have a lint rule for just variables, and I think this should be added.
We could also consider
UnusedFunction
andUnusedType
(records, classes, enums, etc), although this may be more annoying than anything else. Especially as we start to consider Chapel libraries, the place where the function is used may not be available. One limited possibly here is to only check forUnusedFunction
/UnusedType
inside a limited scope like a function body.The text was updated successfully, but these errors were encountered: