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 221004

Summary: Implement an @SuppressWarning facility
Product: php Reporter: davidkarlin
Component: EditorAssignee: Ondrej Brejla <obrejla>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.2   
Hardware: All   
OS: Mac OS X   
Issue Type: ENHANCEMENT Exception Reporter:

Description davidkarlin 2012-10-29 10:09:56 UTC
There are several cases in which the hinter gives a PHP warning which may or may not be truthful but which, for one reason or another, the developer is unable or unwilling to fix (see bug 220993 for an example of this, there are many instances visible on StackOverflow and other forums).

It would be very desirable to have a PHP directive along the lines of:

// @SuppressWarnings WarningCode On
...line of code that was generating the warning...
// @SuppressWarning WarningCode Off

[where WarningCode is either a number or an identifier of a particular warning category]

This would allow developers to maintain a zero tolerance policy for warnings while dealing with a piece of code which really has to stay the way it is.