You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can be already achieved using a trivial XPath rule //VariableId/ArrayDimensions|//MethodDeclaration/ArrayDimensions, but it would be nice to have it in PMD directly.
Activity
pzygielo commentedon Sep 2, 2026
Would it also catch the case for methods?
zbynek commentedon Sep 2, 2026
@pzygielo good point, description updated.
Corresponding Checkstyle rule also covers both https://checkstyle.sourceforge.io/checks/misc/arraytypestyle.html
[-][java] new rule: ArraySizeAfterName[/-][+][java] new rule: ArrayTypeStyle[/+][-][java] new rule: ArrayTypeStyle[/-][+][java] new rule: CStyleArrayDeclaration[/+][-][java] new rule: CStyleArrayDeclaration[/-][+][java] New rule: CStyleArrayDeclaration[/+]