Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans: How to disable this single annoying warning?

The same problem which is occuring in this question is happening a lot to me: Warning "Do not Access Superglobal $_POST Array Directly" on Netbeans 7.4 for PHP

However - of course I take care with $_POST and user input etc. but I do this with custom functions which NetBeans does not understand and therefore my IDE is full of warnings.

Another annoying example: "Too many nested blocks in function declaration". Of course you should avoid that, but I think this is not always possible.

How can I disable single warnings in the Netbeans IDE while still keeping all other warnings?

like image 635
Blackbam Avatar asked Sep 26 '15 13:09

Blackbam


People also ask

How do I turn off suggestions in NetBeans?

If you go into NetBeans > Tools > Options > Editor > Code Completion, you can check or uncheck "Auto Popup Completion Window" for whatever Languages you want.

How do I show warnings in NetBeans?

As of NetBeans 7.2, there's a new "Inpect" window (go to Source > Inspect ...) that will show all the hints for a project. You can also install additional inspectors, like FindBugs, and those hints will be included too.


1 Answers

  1. Netbeans is not asking you to be careful. Netbeans is asking you to use the filter_input function (PHP 5.2+) to totally replace $_XXYY.

  2. You can switch off individual hint types from Tools > Options dialog. You can also change variables like how many nested blocks is too many:

Editor > Hints > Language: PHP > Nested Blocks / Superglobals

like image 92
Sheepy Avatar answered Oct 18 '22 05:10

Sheepy