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 217714 - Variables that "seem to be unused in its scope" are used in included files
Summary: Variables that "seem to be unused in its scope" are used in included files
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: All All
: P4 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
: 228677 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-02 21:53 UTC by regex
Modified: 2016-09-22 18:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description regex 2012-09-02 21:53:59 UTC
$flag = TRUE; // this variable is hinted as unused
$prefix = 'sushi_'; // this variable is also hinted as unused

require './makepage.php'; 

---

/** makepage.php **/

if($flag) { /* stuff */ }
$dish = $prefix.$name;

It would be awesome if the Hint could catch that---there would be a lot fewer "false hints", which would make the hint more useful. As it is, the hints can be so many that I don't look at them anymore.

One way to implement might be to add a flag in Options / Editor / Hints / Unused Variables to "Check Included Files".

Thanks team, wishing you a beautiful week.
Comment 1 Ondrej Brejla 2012-09-03 07:36:41 UTC
That hint is handled just in one file...this "global" crappy stuff is not supported intentionally. It's not easily feasible, so P4 for me as a reminder. Thanks!
Comment 2 amobilia 2016-09-22 18:00:35 UTC
*** Bug 228677 has been marked as a duplicate of this bug. ***