This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245511

Summary: Suppress hints/warnings for excerpts of javascript code
Product: javascript Reporter: NukemBy
Component: EditorAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0.1   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:

Description NukemBy 2014-07-09 10:47:30 UTC
I need to suppress/disable particular hint/warning for excerpt of JS file, specifically I'd like to use '==' (not '===') JS operator in some rare places (1% of cases). Netbeans complains about these cases and currently I only see the option to disable this hint globally, but I do want validation for '===' in rest of 99% of cases.

I could not find already existing bug/enhancement report for this, nor I could find relevant information in http://wiki.netbeans.org/JavaScript. I need to disable hint for the piece of code like following:

    /**
     * @suppress {'=='}
     */
    function test(key) {
        return key == this.key;
    }
    
    or
    
    function test(key) {
        /* @suppress {'=='} */
        return key == this.key;
    }
    
    
Not sure which JS validation engine is using internally in NetBeeans, I've found following relevant doc in the NET:

- http://www.jshint.com/docs/ > Inline configuration
  /* jshint undef: true, unused: true */