Skip to content

Files

Latest commit

 

History

History
28 lines (18 loc) · 785 Bytes

ArrayTypeStyle.md

File metadata and controls

28 lines (18 loc) · 785 Bytes

Pattern: Illegal position for array brackets

Issue: -

Description

This rule enforces the use of either C-style or Java-style for array declarations. The default is Java-style based on Google Java Style Guide - the square brackets form a part of the type, not the variable: String[] args, not String args[].

Default configuration

<module name="ArrayTypeStyle"/>

Examples

To configure the check to enforce C style:

<module name="ArrayTypeStyle">
    <property name="javaStyle" value="false"/>
</module>

Further Reading