apache / apache/netbeans

Parsing and indexing NetBeans bundled resources (JS stub files) should ignore the user defined exclude list

Open
#4,825 14 comments 0 reactions 0 assignees View on GitHub
kind:bug needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 15

### What happened

Since version 15 global variables like `window` and `document` were removed from the list of known global variables (PR #4252). So once upgrading to version 15 we got that confusing situation:

Variables which are really well known as global variables are flagged as "not declared", but at the same time variables like `jQuery` and `$` which are still in the list, but at the same time not necessarily present in the project, are not flagged.

### How to reproduce

Example code:

```js
function demo() {
window.confirm("Really search?");
document.querySelectorAll("textarea");
console.log('Test');
jQuery('#test');
$('#test2');
}
```

### Did this work correctly in an earlier version?

Apache NetBeans 14

### Operating System

Windows 10

### JDK

16.0.1

### Apache NetBeans packaging

Apache NetBeans provided installer

### Anything else

I'm not java developer, but I guess that change that caused that done here https://github.com/apache/netbeans/pull/4252/files#diff-8c9ba7db442e02c9ff8534e66cc66c1ce317ed3f3dd8375657d579c4cc2728b4L62

### Are you willing to submit a pull request?

No

### Code of Conduct

Yes

Contributor guide

Open the contributing guide

Research direction

Start with the JavaScript parsing and indexing path for bundled resources and inspect the change linked from PR #4252, focusing on how the user-defined exclude list is applied. Reproduce the window, document, jQuery, and $ example, then verify that bundled resources ignore the user excludes without changing project-resource behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, javascript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.