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 - Suppress hints/warnings for excerpts of javascript code
Summary: Suppress hints/warnings for excerpts of javascript code
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.1
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-09 10:47 UTC by NukemBy
Modified: 2014-07-09 10:47 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 */