Last published: September 24, 2026
KT.USE_ARRAY_LITERALS_IN_ANNOTATIONS
Annotation uses the 'arrayOf(...)' syntax instead of the array literal '[...]' syntax
This rule detects annotations which use the arrayOf(...) syntax instead of the array literal [...] syntax. The latter should be preferred as it is more readable.
Noncompliant Code
Copy
@PositiveCase(arrayOf("..."))
Compliant Code