apache / apache/netbeans

Ignored folders for Code Analysis in PHP project

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

Description

### Apache NetBeans version

Apache NetBeans 20

### What happened

There are a few ways to ignore files and folders in the Netbeans.
1) "Ignored folders" list, (as it called in UI) or "`ignore.path=`" (as it called in "`\nbproject\project.properties`" file)
It removes files from the project - it is clear and it is working as expected.

2) "Extra Folders for Code Analysis", (as it called in UI) "`code.analysis.excludes=\`" (as it called in "\nbproject\project.properties" file).
In my understanding it should put files in state, when they are being analyzed by the code analysis to be used for code suggestions, but no errors are being reported from them there. This does not work like this. Honestly, it does not work at all. There are some historical artifacts in [stackoverflow](https://stackoverflow.com/questions/24740604/exclude-folders-from-net-beans-8-php-code-analysis) that says that it was working in version 8, but it was working in distorted way. So the stackoverflow question has a lot of interest, but no good answers. So, it is probably a bug. I would also suggest renaming "Extra Folders for Code Analysis" to "Ignored folders for Code Analysis".

3) When there is an obvious problem in the code the there is an icon being shown on the left side of the code editor indicating it (in a shape of a light bulb with the small red circle in the left bottom corner). This icon is clickable with left mouse click, and it gives a list of options to choose from. The lists of these options are different for different cases and different files. For example, for the CSS file that only have one symbol "}" it would give an options
`"filter out CSS parsing errors in C:/.."`
there would be an option to only filter out one file, or a current folder or a parent folder.
It is all very helpful, until you try to unignore these files. Because it is not clear where this list of files and folders. Is this list of files only for CSS or maybe PHP files also can be put there. How to manage this list, how to view this list...
I tried adding some files in this "ignore list" but I find that nothing is being changed in "project.properties" files. So, I don't know where this list is. This lack of transparency definitely should be classified as a bug. I believe the files added to ignoring list should be added to the "code.analysis.excludes=\" list.

### Language / Project Type / NetBeans Component

PHP project

### How to reproduce

I explained it in "What happened" section.

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

Apache NetBeans 13 or earlier

### Operating System

Windows 10 version 10.0 running on amd64; UTF-8; en_AU (nb)

### JDK

19.0.1; Java HotSpot(TM) 64-Bit Server VM 19.0.1+10-21

### Apache NetBeans packaging

Apache NetBeans provided installer

### Anything else

_No response_

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

No

Contributor guide

Open the contributing guide

Research direction

Reproduce the behavior in a PHP project using the NetBeans 20 settings described, comparing Ignored folders, Extra Folders for Code Analysis, and the editor's filtering action. Inspect nbproject/project.properties, especially ignore.path and code.analysis.excludes, and trace where the editor-created exclusions are stored. Done means the exclusion behavior is consistent, the storage is discoverable, and the UI wording accurately describes it.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.