diktat icon indicating copy to clipboard operation
diktat copied to clipboard

Warn if `param` in kdoc present several times

Open kgevorkyan opened this issue 4 years ago • 1 comments

Describe the bug

Consider the following code, where there is exist extra kdoc for already described param2

/**
 * @param param1 description1
 * @param param2 description2
 * @param param2
 */
fun foo(param1: Long, param2: Int) {
    //
}

Expected behavior

WARN: param2 param already present in argument list

Observed behavior

No warnings

Environment information

  • diktat version: 1.0.0-rc3

kgevorkyan avatar Oct 07 '21 10:10 kgevorkyan

Also, if @param present in kdoc for class, but @property is required -- Diktat adds a proper one, but doesn't detect @param as an issue

nulls avatar Aug 02 '22 12:08 nulls