| Summary: | JSDT Parser doesn't respect "Enable Semantic Validation" preference value | ||
|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Victor Rubezhny <vrubezhny> |
| Component: | General | Assignee: | Victor Rubezhny <vrubezhny> |
| Status: | RESOLVED FIXED | QA Contact: | Chris Jaun <cmjaun> |
| Severity: | normal | ||
| Priority: | P3 | CC: | alkazako, thatnitind |
| Version: | 3.6 | ||
| Target Milestone: | 3.5.2 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Victor Rubezhny
I suppose that the reason is the contradiction in following org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter.computeSeverity(int) method rows:
/*
* If semantic validation is not enabled and this is anything but a
* syntax, documentation, or task problem, ignore.
*/
if (!this.options.enableSemanticValidation && (problemID & IProblem.Syntax) == 0 && (problemID & IProblem.Javadoc) == 0 && problemID != IProblem.Task) {
return ProblemSeverities.Ignore;
}
and the fact is that the "Missing Semicolon" problem is a kind of IProblem.Syntax problem.
So, even if Semantic Validation is turned off the "Missing Semicolon" problem is still reported unless it's severity level isn't set to "Ignore".
The same goes to "Uninitialized local variables" preference value as well as for probably all the preferences listed under the JavaScript->Validator->Errors/Warnings.
Pushed to 3.5.2: http://git.eclipse.org/c/jsdt/webtools.jsdt.core.git/commit/?h=R3_5_maintenance&id=b863132bb1b9e8fce80b3e48f3257d429731efee Pushed to 3.6: http://git.eclipse.org/c/jsdt/webtools.jsdt.core.git/commit/?id=7c2cd5de0284d710a14949adce66b0a043451423 Victor, is this bug the cause of the current junit failures? http://build.eclipse.org/webtools/committers/wtp4x-R3.6.0-I/20140107222127/I-3.6.0-20140107222127/testResults/html/org.eclipse.wst.jsdt.core.tests.compiler.JSDTCompilerTests.html Or this fix, I should say. Re-opening the issue, since the current solution hides much more errors/warnings than it should. With this fix the build validation and as-you-type validation (errpr/warning annotations) are showing the same results, not configurable error/warning messages do not depend on the value of "Enable JavaScript semantic validation" preference value. All the JUnit Test cases of DualParseSyntaxErrorTest and SyntaxErrorTest passed successfully. Pushed to 3.5.2: http://git.eclipse.org/c/jsdt/webtools.jsdt.core.git/commit/?h=R3_5_maintenance&id=0395d4124e7b50623a164d076193c1b16b6b6d63 Pushed to 3.6: http://git.eclipse.org/c/jsdt/webtools.jsdt.core.git/commit/?id=b51475df723d7e3ccd1503adea03f593f796cf53 *** Bug 424193 has been marked as a duplicate of this bug. *** Reopenning in order to peek up the fix into webtools.jsdt (new merged) master repository. The commit is in merged webtools.jsdt master branch: http://git.eclipse.org/c/jsdt/webtools.jsdt.git/commit/?id=b51475df723d7e3ccd1503adea03f593f796cf53 already fixed |