Correct line count for custom phpdoc annotation
- Lingua principale
- Java
- Stelle
- 3.1k
- Fork
- 935
- Merge medio
- 2g 3h
- PR unite (30g)
- 17
Descrizione
### 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:
```php
IMHO 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con l’ispezione del conteggio delle righe PHP usando la classe Foo riproducibile nell’issue, confrontando basePhpDoc e phpstanPhpDoc. Conferma il comportamento per i commenti PHPDoc ordinari e quelli con prefisso dello strumento, quindi verifica che entrambi i metodi escludano le righe PHPDoc dal conteggio.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- php
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100