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.
Keeping the assignment operator on the same line as the value being assigned improves understandability of code.
Non-Compliant Code Examples
valconcurrency// The number of coroutines to use
=6funsum(a:Int,b:Int):Int=a+bfuncountFor(jobName:String?=null):Int=3val(first,last)=getName()classRouter{valisEnabledget()=true}valgenerate:()->String?// For now, just return null
={null}
Compliant Code Examples
valconcurrency=// The number of coroutines to use
6funsum(a:Int,b:Int):Int=a+bfuncountFor(jobName:String?=null):Int=3val(first,last)=getName()classRouter{valisEnabledget()=true}valgenerate:()->String?=// For now, just return null
{null}funsum(a:Int,b:Int):Int=a+b
1
2
rulesets:- kotlin-code-style # Rules to enforce Kotlin code style.