Skip to content

Exclude new Kotlin Test directories in default config #5727

Description

@remcomokveld

Expected Behavior

A project using kotlin's new source directory structure does not enforce rules like lateinitusage for files in src/androidUnitTest/** and src/androidInstrumentedTest/** when using the default configuration.

Current Behavior

rules that are excluded by tests in the default config should also be excluded in the new test folder structure.

Context

Kotlin 1.8 introduces a new folder structure https://kotlinlang.org/docs/whatsnew18.html#sourcedirectories

The default detekt configuration file excludes a bunch of different variants of test source sets by default.

It would be nice to either add the new androidUnitTest and androidInstrumentedTest to those defaults as well, or maybe even better, build in support for defaulting all test source sets to be excluded (not sure how feasible that is).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions