This rule enforces consistent spacing around angle brackets used for type parameters in Kotlin. It flags instances where there are unnecessary spaces immediately after the opening < or immediately before the closing >. Inconsistent or excessive spacing within generic type declarations can reduce code readability and deviate from standard Kotlin coding conventions, making the codebase harder to maintain and understand, especially in collaborative environments.
How to remediate
To fix this issue, ensure that there are no extra spaces directly inside the angle brackets. Remove any space between the opening angle bracket (<) and the first type parameter, and between the last type parameter and the closing angle bracket (>). This practice promotes cleaner code that aligns with common Kotlin style guides, enhancing readability and consistency. For example, change Map< Int, String > to Map<Int, String>.