[javascriptlint-commit] SF.net SVN: javascriptlint:[364] trunk/javascriptlint
Status: Beta
Brought to you by:
matthiasmiller
From: <mat...@us...> - 2016-12-23 23:46:57
|
Revision: 364 http://sourceforge.net/p/javascriptlint/code/364 Author: matthiasmiller Date: 2016-12-23 23:46:55 +0000 (Fri, 23 Dec 2016) Log Message: ----------- e4x_deprecated should be a warning, not an error. Modified Paths: -------------- trunk/javascriptlint/jsparse.py trunk/javascriptlint/lint.py trunk/javascriptlint/lintwarnings.py Modified: trunk/javascriptlint/jsparse.py =================================================================== --- trunk/javascriptlint/jsparse.py 2016-12-23 23:38:49 UTC (rev 363) +++ trunk/javascriptlint/jsparse.py 2016-12-23 23:46:55 UTC (rev 364) @@ -58,8 +58,6 @@ assert not start_offset is None jsversion = jsversion or JSVersion.default() assert isvalidversion(jsversion), jsversion - if jsversion.e4x: - error_callback(start_offset, 'e4x_deprecated', {}) return jsengine.parser.parse(script, jsversion.version, error_callback, start_offset) Modified: trunk/javascriptlint/lint.py =================================================================== --- trunk/javascriptlint/lint.py 2016-12-23 23:38:49 UTC (rev 363) +++ trunk/javascriptlint/lint.py 2016-12-23 23:46:55 UTC (rev 364) @@ -417,6 +417,10 @@ version=jsversion.version) return + if jsversion.e4x: + report_lint(None, 'e4x_deprecated', + jsversionnode.start_offset if jsversionnode else script_offset) + root = jsparse.parse(script, jsversion, parse_error, script_offset) if not root: # Report errors and quit. Modified: trunk/javascriptlint/lintwarnings.py =================================================================== --- trunk/javascriptlint/lintwarnings.py 2016-12-23 23:38:49 UTC (rev 363) +++ trunk/javascriptlint/lintwarnings.py 2016-12-23 23:46:55 UTC (rev 364) @@ -103,10 +103,10 @@ 'function_name_missing': 'anonymous function should be named to match property name {name}', 'function_name_mismatch': 'function name {fn_name} does not match property name {prop_name}', 'trailing_whitespace': 'trailing whitespace', + 'e4x_deprecated': 'e4x is deprecated', } errors = { - 'e4x_deprecated': 'e4x is deprecated', 'semi_before_stmnt': 'missing semicolon before statement', 'syntax_error': 'syntax error', 'expected_tok': 'expected token: {token}', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |