Created attachment 132120 [details]
All those "errors" are actually errors of Netbeans syntax parsing
Please, add an option to disable error badges or to ignore an error. In many cases netbeans handles files in wrong way and in projects that host many library code this becomes a real problem - your project is going to be red always! See attached screenshot for an example.
I'm about to stop using NB because of this...
For god sake, make those badges optional!
Php client can make a option to set different type of errors, or not send any.
(In reply to comment #1)
> Php client can make a option to set different type of errors, or not send any.
Not sure what exactly you mean. I'm talking about making error badges optional and allowing to ignore certain errors in files.
Some files have intentionally incorrect syntax - such as sceletons for new project, etc. But in some files netbeans shows errors where php doesn't.
Sorry, it sounds to me as a general enhancement, not PHP specific. Reassigning back.
Editor Settings is infrastructure for loading, saving, importing, exporting editor settings like FontColor, Keybinding and code folding.
It would be best to be specific and write what kind of errors are problematic. Till that the most appropriate category for this is parsing api.
Please read the error description:
The problem is that PHP wrongly parses files and reports spurious errors, it's rather bug than enhancement.
The user request is to be able to disable some kind of errors, see:
>optional and allowing to ignore certain errors in files.
The general infrastructure cannot interpret the error kind, the only thing what can be done in general is to disable error badges for the whole project. The question is why user wants to disable some IDE feature? The answer is because of bugs in PHP parsing. Seems rather as defect to me.
I guess the cause is that the PHP files are invalid. If not, please reopen this issue and attach them.
Some .php files in, for example, Symfony framework are intentionally invalid. For example, they can include patterns to be replaced to be used as a template, etc.
Anyway, when you have library code in your project and there is an error in it - you don't want to edit the library, it will be overwritten with new version.
The other reason is sometimes Netbeans has bugs in parsing some files. For example, 7.3 parses contents inside "<script type='text/template'>" as JS in .twig files, which is incorrect. The fix will be included in next version. Until that people will have this bug.
There is a healthy chance that next v. will have some other parsing bugs as well.
I seems that users from now on are destined to live with error badge on their projects.
Ok so it's well known behavior. It's not a defect, because that "PHP files" are not really valid PHP files. So the badges are shown correctly. But I understand that sometimes it's not a necessary to show these badges, so we'll try to think about some solution to don't show badges in some cases (maybe some "pattern" based solution, or such). Thanks.
*** Bug 227683 has been marked as a duplicate of this bug. ***
It even shows on simple "mixed" php with html/js file. Like when you put everything together like in old days ;)
As in previous versions errors were parsed correctly, in 7.3 I do get loads of silly error badges on html and js parts of the php file. There must be some feature/change from 7.2 to 7.3 that creates this problem.
did you try to install latest updates/patch for 7.3? It should resolve these issues with mixed code. To install updates, go to Help|Check for updates
I have to also ask for an option to disable error badges.
Every single project of mine has badges a lot of it for third party code I'm not going to touch, even if it is just mixed HTML and PHP content.
These patterns on their own line seem to be the biggest culprits so far, but I've seen others.
It actually is enough to make me not want to use this IDE anymore, it feels like chicken little or the boy who cried wolf or something. All these alerts for benign things I don't care about or can't touch anyway.
*** Bug 229864 has been marked as a duplicate of this bug. ***
So is there any way to disable this "feature"?
After upgrade from 7.2 to 7.3, every single project is marked with "Contains files with errors" (but there are no files with errors)...
Created attachment 136004 [details]
Errors on freshly generated project
As I'venoticed, that latest NB doesn't support the markdown (.md) syntax and "checks" it for errors.
The second two files are the skeletons written in (probably) Twig language dunno if that's legit. This question should go to the Symfony Dev's.
But "ignore certain files" feature would be great feature to have.
I've beend waiting half of an year for support of the annotations. Now we don't know how long we're going to wait for fix of this.
It would be great if one could optionally disable error reporting/badging for certain patterns of resources. Path patterns could work in my case, as errors are detected in imported third-party code at certain locations. (Code that I really don't care about, but still causes the whole project to be marked with error.)
Also, project files that are in reality incomplete templates on their own, can be interpreted as containing errors by Netbeans (I guess it depends on the file naming). I understand that Netbeans cannot know that "template.html" really is not supposed to be valid HTML at all, and thus marks it as having errors in it. But for this very reason, the checking must also be adjustable/configurable, since I know more about my projects than Netbeans can automatically guess. Another point that has been brought up is parsing correctness when validating – or false positives. Another reason why it needs to be configurable.
The top-level red badges are extremely annoying when I know they are unrelated to the code I'm actually working on inside a project and I cannot do anything about it.
The "Action items" view has built-in configurable filtering. How about allowing the same kind of filtering for error badges in "Projects" and "Files" view ?
(As a side note, I tried disabling all checks for "HTML Validator" and "CSS" under "Editor -> Hints -> Language: HTML", but errors are still shown for such files, even after erasing NetBeans cache folder to force rescan/reindexing.)
Now, with 7.3, the exclamation point shows up all the time.
*** Bug 224525 has been marked as a duplicate of this bug. ***
*** Bug 237188 has been marked as a duplicate of this bug. ***
For now I'm stuck on verion 7.2.1 and I can't upgrade my Netbeans.
Is 7.2.1 last working verion of Netbeans? Please tell me what shoult I do?
Should I wait for "disable unrecognized error option" become available, are You
planning to add it to editor? Should I start looking new editor?
I've read this bug, as good as some related, many comments and I must be missing something, so I would really appreciate, if someone from the dev team could enlighten me.
I've "jumped" from Netbeans 7.2.1 and I see many error badges / icons in my project's file and folder tree. I don't want them. I want an option to turn them off. Is this really that hard to understand? What else do I need to explain?
There are many (far to many), pointless in my opinion, discussions and comments, thrown between dev team representatives and regular users. Everyone is talking about false positives (or not), about this or that interpreter or error parser doing this or that wrong, about other users that might get lost without that error badges, about this, or that, about blah, blah, blah...
What for? For what reason?
This is as simple and as obvious (or at least should be) as:
1. There are error badges displayed, when there is some error in related file.
2. There are users, that want them.
3. There are users, that don't want them.
Conclusion: We NEED and option to disable error badges / icons in project tree.
End of discussion. Amen. Period.
I do feel that Comment #22 is a blunt, yet accurate, summary of what's going on here. I've navigated around a number of discussions on this general topic (on this site, and others), and it seems like people are talking past each other on this issue.
Calling this a "feature request" as opposed to a "bug" may be the way to go. However, given that the feature that people are frustrated with (the addition of those "error badges" to the files/parents in the project tree view) seemed to appear somewhere in 7.3, and was not a concern <7.3, it's hard to say.
Anyway, IMHO, the addition of a new configuration option, to *compliment* this new "error badge in menu tree" feature (which some people find extremely useful depending on their case) may really reduce a lot of ongoing overhead in the issue queues (e.g. the need to reply-to/track/mark duplicate reports, etc.). Perhaps such an option belongs in "Options > Editor > General" or "Options > Editor > Hints" and could be something like:
Error Badge Display in Project/File Trees:
- Enable on files
- Enable on files and parents recursively
Sure, it would be nice if something like this could be configured on a project-by-project basis, but just exposing it globally would probably make a lot of users very happy.
Finally Mr Ondrej Brejla your the best reseller of PhpStorm I have met! For many years I like to use to NetBeans but You and rest of NetBeans team convince me to pay 80 euro and buy PhpStorm. When using php storm I am threated as human and they respect user's needs.
Good bye cocky Netbeans team :(
TL;DR - Just want to underscore how important this feature request is, and offer to donate $10 to whoever builds the feature.
Many users have projects that contain external (or even internal) code that we have no intention of maintaining. Since the warnings in the files/projects tab are actually UI indications of work to do, it is like the IDE is constantly screaming at us to do something and it is frustrating to be constantly distracted by it and not be able to silence it.
I would contribute this feature myself if I could but I'm not a Java developer, so I'll pay someone to do it. I think others would too. This is a great product when it works and it's a blessing to use it for free. Completely serious - PM me if you're up for it.
I'll try to implement a solution where just user defined file extensions will be "parsed" as a PHP source. So these cases of parsing Markdown files, etc. where invalid PHP snippets occur and show errors will be ok.
Non-php files will be parsed and validated only if one registers their extension as a "text/x-php5" mime type explicitly in options. I think that it should help you a lot ;)
But stay calm, I'll have to test it, it's just an idea in my tired brain :)
In my case that will not be enough.
I have "php" files witch mixed php and html (not all html tags ar closed, or are closed outside php code block).
I really need just to disable this "feature". I'm still on 7.2, and i'm thinking about changing to other IDE because of this.
If you open the affected "php", there should be hint at the first line to disable HTML validation for given mimetype (in case of php, text/x-php5)
Yep, as Vlada wrote.
But in general "option to disable error badges" issue is not just a PHP problem. It's an enhancement for an infrastructure. But it arised because some non-php files were parsed even though they shouldn't (parsing run in a file which wasn't registered as a php file). And that's the problem what I'll try to solve. After that I'll reasign this enhancement to the infrastructure.
For me problem is when I'm using third-party code, like Symfony Framework and many different bundles for it. All of this is in my project in 2 directories, and both of them are marked as invalid, so my whole project is marked as invalid too. It would be much easier if I could disable parsing of this directories, so I could see if my whole project is ok or not. Changing mime-type of my files or several thousand Symfony/other-not-my-files is not a solution.
And for me too. It's not only about html in php.
I really want to disable this feature.
Just for clarification, 2 things:
1) disable parsing for a directory
You can do it right now. In project properties, you can mark a foleder as "Ignored". Then it will not be parsed. No errors.
2) disable error badges propagation
a) in files which are NOT php files but can contain some PHP snippet (e.g. markdown, etc.)
This will be, hopefully, solved by my fix.
b) in files which "are" PHP files, but are not valid, because they actually are NOT php files
Mostly they are some "template" files which should have an extra mime type but they rape PHP mime type in a wrong way.
This will not be solved by us, because that's a wrong design of your frameworks/libs and such.
But maybe someone from infrastructre will implement "disable error badges propagation for folders". But as I said, it's not a PHP issue. Same requirement can be applied for *every* project type.
I only want to completly disable error badges.
Not per mime type, or something else.
In our case it's completly useless.
Yes that's the case I described in comment #33. It's a requirement to IDE infrastraucture, not for PHP modules.
(In reply to Ondrej Brejla from comment #32)
> You can do it right now. In project properties, you can mark a foleder as
> "Ignored". Then it will not be parsed. No errors.
I guess this does not apply to Maven+Java-projects ? I se no way of doing this in project properties.
(In reply to Ondrej Brejla from comment #35)
> Yes that's the case I described in comment #33. It's a requirement to IDE
> infrastraucture, not for PHP modules.
I filed this enhancement request:
(since this bug is specifically about PHP).
(In reply to oyviste from comment #36)
> (In reply to Ondrej Brejla from comment #32)
> > You can do it right now. In project properties, you can mark a foleder as
> > "Ignored". Then it will not be parsed. No errors.
> I guess this does not apply to Maven+Java-projects ? I se no way of doing
> this in project properties.
Yes, it's just PHP Project Type specific feature (imho).
> (In reply to Ondrej Brejla from comment #35)
> > Yes that's the case I described in comment #33. It's a requirement to IDE
> > infrastraucture, not for PHP modules.
> I filed this enhancement request:
> (since this bug is specifically about PHP).
Great. I have a solution which will "hide" propagation of all error badges from PHP parsing...so it can help someone a lot, but it's a general problem.
Ok, so I fixed that improper parsing of non-PHP files in issue #238807. And according to requirements, one can use a new NB property to disable error badges from PHP files. From *all* files, no configuration allowed (it's just workaround until issue #238782 will be implemented). If you want to use it, just run NB with this:
Then PHP files will be parsed, you will see parser errors when a file is opened in Editor window, but NO error badges will occur in Project View.
Both fixes are implemented in dev build and will be in NB 8.0.
And because @oyviste filed a new enhancement issue #238782 for infrastructure to allow "disabling error badges for directories etc. for every project type", then closing this issue as fixed. Thanks.
I donwloaded 8.0 beta and this option does not work
these f***ing error bages are still there!!
I'm using Netbeans 8.0 dev build 201401230001, and the error badges are *not* appearing. It's remembering my settings from 7.4.
(In reply to RobertJohnson from comment #40)
> I'm using Netbeans 8.0 dev build 201401230001, and the error badges are
> *not* appearing. It's remembering my settings from 7.4.
I was tesing netbeans-8.0beta-php-windows.exe from official download avaiable right now and it still shows error icons on html files even when I chosen Disable Error Checking in HTML files and these icons go up on folder and mark the whole project as errored!
Here are my former bug reports on this issue
daorus...don't reopen unrelated issue, especially if you opened new ones in proper component.
(In reply to Ondrej Brejla from comment #42)
> daorus...don't reopen unrelated issue, especially if you opened new ones in
> proper component.
please, clarify what you mean:
this bug issue is marked as done, saying that if we start netbeans with option
we will see no error bages in project tree, right?
If you download beta 8.0 right now and start netbeans with this flag, error bages are still there. That's why I reopen this bug issue.
No, this option disables erorr badges from PHP parser, as I wrote before. It doesn't affect any other languages, errors and such. It's written in comment #38. If you are unsatisfied with propagating of errors from other languages, file issue to a proper component.
I think to mention, when you use that option, that file, which causes errors has to be reindexed. So open it and modify, or let the whole project to be reindexed (e.g. clean NB userdir).
(In reply to Ondrej Brejla from comment #44)
> No, this option disables erorr badges from PHP parser, as I wrote before. It
> doesn't affect any other languages, errors and such. It's written in comment
> #38. If you are unsatisfied with propagating of errors from other languages,
> file issue to a proper component.
Sorry, my fault. I thought that your option allows globally to turn off these f***ing error bages! (((
I created issue long time ago, but they all were closed as duplicated of some other bug issues which are completly not related to these erorr bages and therefore my issue just died...
Now these error bages appear on html files even when checking html is disabled
To produce these problem just create fresh new PHP project, add emtpy file a.html
and add the following line
I will generate error and these f***ing error bages up in the whole hierachy and mark the whole project as errored.
Because of these error I still work on NB 7.3 Beta 2 because there is no such an disaster with there error bages...
(In reply to Ondrej Brejla from comment #45)
> I think to mention, when you use that option, that file, which causes errors
> has to be reindexed. So open it and modify, or let the whole project to be
> reindexed (e.g. clean NB userdir).
there is no need to clean userdir cause i tested fresh new NB 8.0 Beta
I tried these options
None has helped and these error bages are still there!!...
Created attachment 144423 [details]
Disabled error badges
I just tested it in official 8.0 beta download and it is working with no problem. Error badges are disabled in Projects window (see screenshot).
Marking as verified.
Product Version: NetBeans IDE 8.0 Beta (Build 201401141042)
Java: 1.7.0_51; Java HotSpot(TM) 64-Bit Server VM 24.51-b03
Runtime: Java(TM) SE Runtime Environment 1.7.0_51-b13
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
(In reply to Ondrej Brejla from comment #32)
> Just for clarification, 2 things:
> 1) disable parsing for a directory
> You can do it right now. In project properties, you can mark a foleder as
> "Ignored". Then it will not be parsed. No errors.
As far as I understand the "Ignored Folders"-functionality this will do way more than ignore parsing errors of these folders, though. Please consider the following use case (which I personally have to work with a lot):
- I have a project with several third party libraries.
- I want to have a look into the third party files to properly understand how they work
- I want to check in the whole project, including the third party libraries, into version control, because - even though it happens rarely - sometimes I have to fix a small bug within these libraries (and I can't/won't wait until the bug is fixed upstream and put into a proper release of the library)
Is there any way I could mark a specific third party library (or often only a single folder or file in it) so that error badges are not displayed for that file/folder but the file/folder is still within my project tree, still under version control etc.?
Thank you for your consideration.