[javascriptlint-commit] SF.net SVN: javascriptlint:[321] trunk
Status: Beta
Brought to you by:
matthiasmiller
From: <mat...@us...> - 2013-09-30 21:19:29
|
Revision: 321 http://sourceforge.net/p/javascriptlint/code/321 Author: matthiasmiller Date: 2013-09-30 21:19:27 +0000 (Mon, 30 Sep 2013) Log Message: ----------- Don't warning against increment/decrement assignments in expressions. Modified Paths: -------------- trunk/javascriptlint/warnings.py trunk/tests/warnings/equal_as_assign.js Modified: trunk/javascriptlint/warnings.py =================================================================== --- trunk/javascriptlint/warnings.py 2013-09-30 21:11:45 UTC (rev 320) +++ trunk/javascriptlint/warnings.py 2013-09-30 21:19:27 UTC (rev 321) @@ -322,7 +322,7 @@ if kid.kind == tok.LP: raise LintWarning, node -@lookfor(tok.ASSIGN) +@lookfor((tok.ASSIGN, None)) def equal_as_assign(node): # Allow in VAR statements. if node.parent.parent and node.parent.parent.kind == tok.VAR: Modified: trunk/tests/warnings/equal_as_assign.js =================================================================== --- trunk/tests/warnings/equal_as_assign.js 2013-09-30 21:11:45 UTC (rev 320) +++ trunk/tests/warnings/equal_as_assign.js 2013-09-30 21:19:27 UTC (rev 321) @@ -4,6 +4,9 @@ while (a = b) { /*warning:equal_as_assign*/ a++; } + while (a -= b) { + a--; + } var c; a = b = c; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |