emacs-elsa / Elsa

Emacs Lisp Static Analyzer and gradual type system.
GNU General Public License v3.0
644 stars 27 forks source link

Add check for useless assignments #82

Open Fuco1 opened 6 years ago

Fuco1 commented 6 years ago

The implementation is related to #39.

We can have code like this:

(setq a 1) ;; this is useless
(other forms not using a)
(setq a 2) ;; a == 1 was never used
(setq b a)

So we look for variables/forms which are assigned but never read.