This rule is in place to ensure that Kotlin classes do not begin with unnecessary blank lines. The presence of blank lines at the start of a class can lead to confusion and can make the code harder to read. It breaks the flow of the code and can make it less intuitive to understand the structure of the class.
Non-Compliant Code Examples
classFoo{valfoo="foo"}
Compliant Code Examples
classFoo{valbar="bar"valfoo="foo"}
Seamless integrations. Try Datadog Code Security
Datadog Code Security
Try this rule and analyze your code with Datadog Code Security
How to use this rule
1
2
rulesets:- kotlin-code-style # Rules to enforce Kotlin code style.
Create a static-analysis.datadog.yml with the content above at the root of your repository
Use our free IDE Plugins or add Code Security scans to your CI pipelines