clutchski/coffeelint

catch "if" statement with single "="

Open

#355 ouverte le 27 nov. 2014

Voir sur GitHub
 (3 commentaires) (1 réaction) (0 assignés)CoffeeScript (169 forks)batch import
Help Wantednew rule

Métriques du dépôt

Stars
 (1 203 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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()

Guide contributeur