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
シームレスな統合。 Datadog Code Security をお試しください
Datadog Code Security
このルールを試し、Datadog Code Security でコードを解析する
このルールの使用方法
1
2
rulesets:- kotlin-code-style # Rules to enforce Kotlin code style.