Skip to content

Files

Latest commit

 

History

History
39 lines (30 loc) · 694 Bytes

KDocReferencesNonPublicProperty.md

File metadata and controls

39 lines (30 loc) · 694 Bytes

Pattern: Use of KDoc comment for non-public prop

Issue: -

Description

This rule will report any KDoc comments that refer to non-public properties of a class. Clients do not need to know the implementation details.

Example of incorrect code:

/**
* Comment
* [prop1] - non-public property
* [prop2] - public property
*/
class Test {
    private val prop1 = 0
    val prop2 = 0
}

Example of correct code:

/**
* Comment
* [prop2] - public property
*/
class Test {
    private val prop1 = 0
    val prop2 = 0
}

Further Reading