This product is not supported for your selected Datadog site. ().
Cette page n'est pas encore disponible en français, sa traduction est en cours. Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.
Metadata
ID:kotlin-code-style/argument-list-wrapping
Language: Kotlin
Severity: Notice
Category: Code Style
Description
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,)
1
2
rulesets:- kotlin-code-style # Rules to enforce Kotlin code style.