clutchski/coffeelint

catch "if" statement with single "="

Open

#355 aperta il 27 nov 2014

Vedi su GitHub
 (3 commenti) (1 reazione) (0 assegnatari)CoffeeScript (169 fork)batch import
Help Wantednew rule

Metriche repository

Star
 (1203 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

How about catching the mistake that I make most often? An "if" statement that uses a single "=" instead of double "==" compiles just fine, but causes confusing behaviour at runtime. I wish my editor would warn me when I do this. Example:

if a = b
    do_something()

Guida contributor