Query module DeadStoreOfLocal

name
Useless assignment to local variable
description
An assignment to a local variable that is not used later on, or whose value is always overwritten, has no effect.
kind
problem
problem.severity
warning
id
js/useless-assignment-to-local
tags
maintainability external/cwe/cwe-563
precision
very-high

Imports

DeadStore

Provides classes and predicates for reasoning about dead stores.

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Predicates

deadStoreOfLocal

Holds if vd is a definition of variable v that is dead, that is, the value it assigns to v is not read.