Correct line count for custom phpdoc annotation #8246
Labels
kind:bug
Bug report or fix
needs:triage
Requires attention from one of the committers
PHP
[ci] enable extra PHP tests (php/php.editor)
Apache NetBeans version
Apache NetBeans 24
What happened
As part of ensuring application code quality compliance, there is a metric in Netbeans that one method should ideally not exceed 20 lines of application code. If the code is annotated using phpDoc comments, these lines are not properly counted in the total.
However, once semantically identical comments are used, but with a tool prefix such as PHPStan or Psalm, these lines are unfortunately counted in the total count, leading to a warning error being reported for the method in question, or for the entire length of the class.
Translated with www.DeepL.com/Translator (free version)
Language / Project Type / NetBeans Component
PHP
How to reproduce
Just paste the following code into the new PHP file:
And see te difference between
basePhpDoc
andphpstanPhpDoc
methodsIMHO any lines of PHPDoc should be ignored in lines count
Did this work correctly in an earlier version?
No
Are you willing to submit a pull request?
I want to, but I'm not a Java developer
The text was updated successfully, but these errors were encountered: