All arguments should be on separate lines or the same line.
In long argument lists, put a line break after the opening parenthesis. Indent arguments, and group multiple closely related arguments near each other.
Non-Compliant Code Examples
valfoo=foo(a,b,c,)valbar=foo(a,b,c,// hi
)
Compliant Code Examples
valfoo=foo(a,b,c,)valfoo=foo(a,b,c)privatefuntelemetryAttributes(element:PsiElement,logInfo:LogLineInfo)=mapOf("language"toelement.language.id,"framework"tologInfo.framework,// deprecated - see IDE-3771 (suggest to remove after May-2025)
"logs.framework"tologInfo.framework,"logs.level"to(logInfo.level?.label?:""))valservicesWithProfiling=client.profilingApi().findServicesWithProfiling(emptySet(),ctx.environment,// do we want to pass the env?
ctx.timeInterval// use context interval
)drawSquare(x=10,y=10,)
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