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
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