Correct line count for custom phpdoc annotation
- 主要言語
- Java
- スター
- 3.1k
- フォーク
- 935
- 平均マージ
- 2日 3時間
- マージ済み PR(30日)
- 17
説明
### 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
コントリビューションガイド
調査の方向性
issue にある再現可能な Foo クラスを使った PHP の行数検査から始め、basePhpDoc と phpstanPhpDoc を比較します。通常の PHPDoc コメントとツールプレフィックス付きの PHPDoc コメントについて動作を確認し、その後、両方のメソッドが PHPDoc の行をカウントから除外することを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- php
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100