KT.SPACING_BETWEEN_PACKAGE_AND_IMPORTS

Spacing needed between package and import statements

This rule verifies spacing between package and import statements as well as between import statements and class declarations.

Noncompliant Code

Copy
package foo
import a.b
class Bar { }

Compliant Code

Copy
package foo

import a.b

class Bar { }

The content on this page is adapted from the Detekt Docs. Copyright ©2022 The Detekt Team. All rights reserved. https://detekt.dev/comments.html