Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forbid no/abundant whitespace before array initializer #391

Merged
merged 2 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Airbase 155
* Checkstyle updates:
- Require exactly one space between array type and array initializer.

Airbase 154
* Fix javadoc building when `air.compiler.enable-preview` is set

Expand Down Expand Up @@ -1220,4 +1224,3 @@ Airbase 2
Airbase 1

* Initial release

Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,14 @@
<property name="ignoreComments" value="true" />
</module>

<module name="RegexpSinglelineJava">
<!-- Forbid "new Type[]{", IntelliJ would reformat adding a space -->
<!-- Forbid "new Type[] {", IntelliJ would reformat removing a space -->
<property name="format" value="new\s++\w++(&lt;\?&gt;)?(\[\])++(\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
Loading