[javascriptlint-commit] SF.net SVN: javascriptlint:[372] trunk
Status: Beta
Brought to you by:
matthiasmiller
|
From: <mat...@us...> - 2016-12-30 22:51:49
|
Revision: 372
http://sourceforge.net/p/javascriptlint/code/372
Author: matthiasmiller
Date: 2016-12-30 22:51:46 +0000 (Fri, 30 Dec 2016)
Log Message:
-----------
Stop hiding the fact that ambiguous_else_stmt is on the statement line, not on the "else".
Modified Paths:
--------------
trunk/test.py
trunk/tests/warnings/ambiguous_else_stmt.js
Modified: trunk/test.py
===================================================================
--- trunk/test.py 2016-12-30 22:48:30 UTC (rev 371)
+++ trunk/test.py 2016-12-30 22:51:46 UTC (rev 372)
@@ -53,12 +53,6 @@
def lint_error(path, line, col, msg_type, errname, errdesc):
warning = (line, msg_type, errname)
-
- # Bad hack to fix line numbers on ambiguous else statements
- # TODO: Fix tests.
- if errname == 'ambiguous_else_stmt' and not warning in expected_warnings:
- warning = (line-1, msg_type, errname)
-
if warning in expected_warnings:
expected_warnings.remove(warning)
else:
Modified: trunk/tests/warnings/ambiguous_else_stmt.js
===================================================================
--- trunk/tests/warnings/ambiguous_else_stmt.js 2016-12-30 22:48:30 UTC (rev 371)
+++ trunk/tests/warnings/ambiguous_else_stmt.js 2016-12-30 22:51:46 UTC (rev 372)
@@ -16,6 +16,6 @@
while (j) /*warning:ambiguous_nested_stmt*/
if (y) /*warning:ambiguous_nested_stmt*/
y--;
- else /*warning:ambiguous_else_stmt*/
- y++;
+ else
+ y++; /*warning:ambiguous_else_stmt*/
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|