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 247891 - [Warning] Unused loaded module
Summary: [Warning] Unused loaded module
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: RequireJS (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-13 11:14 UTC by Ondrej Brejla
Modified: 2014-10-13 11:14 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 Ondrej Brejla 2014-10-13 11:14:40 UTC
It would be great to have a warning for an "unused loaded module".

Example:

define([
    'blah/Foo',
    'blah/Bar'
], function(Foo, Bar) { // Bar should be marked with a Warning...

    Foo.doSomething();

});

blah/Bar is loaded, but never used, so it probably shouldn't be loaded...

This is ok:

define([
    'blah/Foo',
    'blah/Bar'
], function(Foo) {

    Foo.doSomething();

});

blah/Bar is loaded because it needs to initialize something, but there is no Bar param in a function, because it is not used in this module.

Thanks.