Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 243886

Summary: Provide a way to disable JS semantic analyzer/validator
Product: [WebTools] JSDT Reporter: Michael Spector <spektom>
Component: GeneralAssignee: Nitin Dahyabhai <thatnitind>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: major    
Priority: P3 CC: johnjbarton, thatnitind
Version: 3.0Flags: thatnitind: review+
Target Milestone: 3.1 M6   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
disable all but syntax errors patch
none
modified patch
none
Modified patch + UI changes none

Description Michael Spector CLA 2008-08-12 10:50:01 EDT
I'm getting about 10,000 errors in the Problems view after importing Dojo framework into a JavaScript project. It's true that Dojo code is written using special syntax, and JSDT inferencer doesn't know how to bind every element, but it's a runnable JavaScript code after all... Therefore, there should be an option to disable various semantic checks, and leave only standard JavaScript code parser analyzer.
Comment 1 Phil Berkland CLA 2008-08-19 18:58:40 EDT
The JavaScript validation page already provides the capability of turning off the errors (via configuring error/warning/ignore) for many of the error types.  Anything above  what is already there would require a user interface change which cannot be made in a maintanance release.
Comment 2 Michael Spector CLA 2008-08-21 11:53:29 EDT
(In reply to comment #1)
> The JavaScript validation page already provides the capability of turning off
> the errors (via configuring error/warning/ignore) for many of the error types. 
> Anything above  what is already there would require a user interface change
> which cannot be made in a maintanance release.
> 

The problem is that all error kinds cannot be disabled for now. There are still many errors, even if I disable all errors. What I'm asking is the way to disable all errors except for JS pure syntax errors. Please see the patch as an example of what I'm asking, this patch adds undocumented preference constant that disables all but syntax errors.
Comment 3 Michael Spector CLA 2008-08-21 11:54:24 EDT
Created attachment 110584 [details]
disable all but syntax errors patch
Comment 4 Phil Berkland CLA 2008-08-21 17:49:49 EDT
Created attachment 110626 [details]
modified patch
Comment 5 Phil Berkland CLA 2008-08-21 17:51:42 EDT
modified slightly to use options object.
Will check in to 3.0.2. 
Do you want to leave this bug open until the UI can be updated?
Comment 6 Michael Spector CLA 2008-08-24 05:50:21 EDT
Created attachment 110751 [details]
Modified patch + UI changes

Here's a modified patch that includes UI changes as well.
Comment 7 Nitin Dahyabhai CLA 2009-02-16 16:48:11 EST
Committed, with a spelling fix and touch-ups to the UI changes.  The headless portion was previously released.
Comment 8 Nitin Dahyabhai CLA 2009-02-16 18:52:47 EST
Disabling by default, and adding a modification to pass-through detected tasks.
Comment 9 Chris Jaun CLA 2009-09-15 10:11:35 EDT
*** Bug 162451 has been marked as a duplicate of this bug. ***