[Bug]: TestMethodNameDetector does not scan all tests

オープン 初心者向け
#1,984 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

@drawers がすでに取り組んでいます。

2025年11月6日 から。

  • #1985 @drawers による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
kotlin
領域
testing

調査の方向性

TestMethodNameDetector.kt と InterestListsDetailsScreenTest.kt で使用されているアノテーションから始め、その後 gradle :app:lintAnalyzeDemoDebugUnitTest を実行します。スキャン対象のアノテーション使用型がどのように選択されるかを確認します。test_ プレフィックスを付けて名前変更したテストメソッドが、IDE と Gradle lint task の両方で警告を生成すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug
Is there an existing issue for this?
  • I have searched the existing issues
Is there a StackOverflow question about this issue?
  • I have searched StackOverflow
What happened?
  1. Go to InterestListsDetailsScreenTest.kt
  2. Change one of the test names to include the prefix test_
Expected

TestMethodNameDetector should issue a warning, both in the IDE and in tasks like gradle :app:lintAnalyzeDemoDebugUnitTest

Actual

No warning

The reason this is happening is because the annotations on the tests in InterestListsDetailsScreenTest.kt have AnnotationUsageType.DEFINITION which the TestMethodNameDetector.kt does not currently opt-in to scan for. Will submit a patch.

Code of Conduct
  • I agree to follow this project's Code of Conduct
主要言語
Kotlin
スター
22.1k
フォーク
4.7k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

android/nowinandroid のほかの issue

android/nowinandroid の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。