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.
Summary: | Detect possibly useless strings (by hint) | ||
---|---|---|---|
Product: | php | Reporter: | sergioabreu |
Component: | Editor | Assignee: | Ondrej Brejla <obrejla> |
Status: | REOPENED --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 7.3.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
sergioabreu
2013-10-03 01:05:43 UTC
This is absolutely valid PHP snippet. It can be run without any parsing/other error. OK, maybe I should change the title of the bug presented. Netbeans uses to warn users of several less important problems in code. In this case, ALTHOUGH it is an "absolute valid PHP snippet", you should agree that this snippet is useless in the code. So I suggest that Netbeans shows the yellow warning icon in that line, telling that that string is not being doing anything in the code, since it: * was not attribute to any variable. * was not concatenated to anything. * there is no echo, print, etc showing it. So, if it is useless in the code - doesn't matter if the syntax is allowed or not by PHP, a good IDE should indicate a possible mistake of the programmer, in this case the concatenation was accidentally closed one line above. Consider taking it as a feature. This would upgrade the Netbeans quality in this specific issue. Regards. Sergio It's definitely not a defect. If you want to be warned to valid syntax, it's an enhancement for a new hint. Sorry for my typos, and thanks for the attention. The situation I showed in my first post makes me believe that the non existence of this inteligence can cause undesirable results for the programmer. In my first post, I showed an example in which the intention was to concatenate a string in a multiline sintax, and the introdution of ';' instead of '.' at the end of a line puts the programmer in a badly and false state of correctness since the line after ';' will NOT be concatenated. Regards. |