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