There should be one space between the fun keyword and the name of the function it defines.
Non-Compliant Code Examples
funfoo()="some-result"funfoo()="some-result"funMutableList<Int>.swap(index1:Int,index2:Int){valtmp=this[index1]// 'this' corresponds to the list
this[index1]=this[index2]this[index2]=tmp}
Compliant Code Examples
funfoo()="some-result"funMutableList<Int>.swap(index1:Int,index2:Int){valtmp=this[index1]// 'this' corresponds to the list
this[index1]=this[index2]this[index2]=tmp}fun<T>foo(arg:T){}
シームレスな統合。 Datadog Code Security をお試しください
Datadog Code Security
このルールを試し、Datadog Code Security でコードを解析する
このルールの使用方法
1
2
rulesets:- kotlin-code-style # Rules to enforce Kotlin code style.