Skip to content

CheckstyleAntTaskTest.testNoFileOrPathSpecified not executed because it's static #17924

@mureinik

Description

@mureinik

Seen in the CI (e.g., https://dev.azure.com/romanivanovjr/romanivanovjr/_build/results?buildId=32943&view=logs&jobId=e663805c-ee13-5a24-f979-d725e0346c8e&j=c902ebb4-c9f8-5f09-4e17-ff78fbbc842e&t=9ca98c81-ff64-58f0-9d03-a23ac1c4a111):

./.ci/validation.sh test
# snipped a lot of output that is irrelevant for this bug report
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Oct 12, 2025 8:04:40 PM org.junit.platform.launcher.core.DiscoveryIssueNotifier logIssues
WARNING: TestEngine with ID 'junit-jupiter' encountered a non-critical issue during test discovery:

(1) [WARNING] @Test method 'public static void com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTaskTest.testNoFileOrPathSpecified()' must not be static. It will not be executed.
    Source: MethodSource [className = 'com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTaskTest', methodName = 'testNoFileOrPathSpecified', methodParameterTypes = '']
            at com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTaskTest.testNoFileOrPathSpecified(SourceFile:0)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions