Skip to content

Commit

Permalink
Forbid no/abundant whitespace before array initializer
Browse files Browse the repository at this point in the history
Forbid these

    new int[]{...

    new int[]    {....
  • Loading branch information
findepi committed Jan 10, 2024
1 parent 2b85f4a commit 39240d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Airbase 149
* Remove bval dependency
* Checkstyle updates:
- Disallow single-line non-empty lambda and method body code blocks.
- Require exactly one space between array type and array initializer.
* Plugin updates:
- git-commit-id-maven-plugin 7.0.0 (from 6.0.0)
- spotbugs-maven-plugins 4.8.1.0 (from 4.7.3.6)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,12 @@
<property name="ignoreComments" value="true" />
</module>

<module name="RegexpSinglelineJava">
<property name="format" value="\[\](\s{2,})?\{" />
<property name="message" value="Incorrect whitespace before array initializer" />
<property name="ignoreComments" value="true" />
</module>

<!-- javadoc -->
<module name="RequireEmptyLineBeforeBlockTagGroup" />
<module name="NonEmptyAtclauseDescription" />
Expand Down

0 comments on commit 39240d0

Please sign in to comment.