KT.OUTDATED_DOCUMENTATION
Class, function or constructor with KDoc does not match the declaration signature
This rule will report any class, function or constructor with KDoc that does not match the declaration signature. If KDoc is not present or does not contain any @param or @property tags, rule violation will not be reported. By default, both type and value parameters need to be matched and declarations orders must be preserved. You can turn off these features using configuration options.
Noncompliant Code
Copy
/**
* @param someParam
* @property someProp
*/
class MyClass(otherParam: String, val otherProp: String)
/**
* @param T
* @param someParam
*/
fun <T, S> myFun(someParam: String)
Compliant Code
Copy
/**
* @param someParam
* @property someProp
*/
class MyClass(someParam: String, val someProp: String)
/**
* @param T
* @param S
* @param someParam
*/
fun <T, S> myFun(someParam: String)
Options
-
matchTypeParameters
(default:True
)if type parameters should be matched
-
matchDeclarationsOrder
(default:True
)if the order of declarations should be preserved
-
allowParamOnConstructorProperties
(default:False
)if we allow constructor parameters to be marked as @param instead of @property