[javascriptlint-commit] SF.net SVN: javascriptlint:[319] trunk
Status: Beta
Brought to you by:
matthiasmiller
From: <mat...@us...> - 2013-09-30 21:03:26
|
Revision: 319 http://sourceforge.net/p/javascriptlint/code/319 Author: matthiasmiller Date: 2013-09-30 21:03:23 +0000 (Mon, 30 Sep 2013) Log Message: ----------- Allow chained assigns. 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 20:59:56 UTC (rev 318) +++ trunk/javascriptlint/warnings.py 2013-09-30 21:03:23 UTC (rev 319) @@ -324,7 +324,8 @@ @lookfor(tok.ASSIGN) def equal_as_assign(node): - if not node.parent.kind in (tok.SEMI, tok.RESERVED, tok.RP, tok.COMMA): + if not node.parent.kind in (tok.SEMI, tok.RESERVED, tok.RP, tok.COMMA, + tok.ASSIGN): raise LintWarning, node @lookfor(tok.IF) Modified: trunk/tests/warnings/equal_as_assign.js =================================================================== --- trunk/tests/warnings/equal_as_assign.js 2013-09-30 20:59:56 UTC (rev 318) +++ trunk/tests/warnings/equal_as_assign.js 2013-09-30 21:03:23 UTC (rev 319) @@ -4,4 +4,7 @@ while (a = b) { /*warning:equal_as_assign*/ a++; } + + var c; + a = b = c; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |