apache / apache/netbeans

Correct line count for custom phpdoc annotation

Offen
#8,246 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
kind:bug needs:triage PHP
Vorherrschende Sprache
Java
Sterne
3.1k
Forks
935
Ø Merge
2 T. 3 Std.
Gemergte PRs (30 T.)
17

Beschreibung

### 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der PHP-Zeilenzählprüfung unter Verwendung der reproduzierbaren Foo-Klasse im Issue und vergleiche basePhpDoc mit phpstanPhpDoc. Bestätige das Verhalten für gewöhnliche und mit einem Tool-Präfix versehene PHPDoc-Kommentare und überprüfe anschließend, dass beide Methoden PHPDoc-Zeilen bei der Zählung ausschließen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
php
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.