Skip to content

Files

Latest commit

 

History

History
19 lines (12 loc) · 475 Bytes

ForbiddenImport.md

File metadata and controls

19 lines (12 loc) · 475 Bytes

Pattern: Use of forbidden import

Issue: -

Description

This rule allows to set a list of forbidden imports. This can be used to discourage the use of unstable, experimental or deprecated APIs. Detekt will then report all imports that are forbidden.

Example of incorrect code:

package foo
import kotlin.jvm.JvmField
import kotlin.SinceKotlin

Further Reading