Skip to content

[Bug]: TestMethodNameDetector does not scan all tests #1984

@drawers

Description

@drawers

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions