Skip to content

Commit aa4c154

Browse files
committed
Update import order in IDEA code style
1 parent afe4fb6 commit aa4c154

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

CONTRIBUTING.adoc

+1-4
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@ Active contributors might be asked to join the core team, and given the ability
4040
None of these is essential for a pull request, but they will all help. They can also be
4141
added after the original pull request but before a merge.
4242

43-
* We use the https://github.com/spring-io/spring-javaformat/[Spring JavaFormat] project to apply code formatting conventions.
44-
If you use Eclipse and you follow the '`Importing into eclipse`' instructions below you should get project specific formatting automatically.
45-
You can also install the https://github.com/spring-io/spring-javaformat/#intellij-idea[Spring JavaFormat IntelliJ Plugin] or format the code from the Gradle build by running `./gradlew format`.
46-
// NYI: Note that if you have format violations in `buildSrc`, you can fix them by running `./gradlew -p buildSrc format` from the project root directory.
43+
* We use the https://github.com/spring-io/spring-javaformat/[Spring JavaFormat] project to apply code formatting conventions. The code can be formatted from the Gradle build by running `./gradlew format`. The code can also be formatted from your IDE when the formatter plugin https://github.com/spring-projects-experimental/spring-pulsar/wiki/Working-with-the-Code#install-the-spring-formatter-plugin[has been installed].
4744
* The build includes Checkstyle rules for many of our code conventions. Run `./gradlew checkstyleMain checkstyleTest` if you want to check your changes are compliant.
4845
* Make sure all new `.java` files have a Javadoc class comment with at least an `@author` tag identifying you, and preferably at least a paragraph on what the class is for.
4946
* Add the ASF license header comment to all new `.java` files (copy from existing files in the project).

idea/codeStyleConfig.xml

+6-7
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<package name="" withSubpackages="true" static="false"/>
3838
<emptyLine/>
3939
<package name="org.springframework" withSubpackages="true"
40-
static="false"/>
40+
static="false"/>
4141
<emptyLine/>
4242
<package name="" withSubpackages="true" static="true"/>
4343
</value>
@@ -53,16 +53,15 @@
5353
</option>
5454
<option name="IMPORT_LAYOUT_TABLE">
5555
<value>
56+
<package name="" withSubpackages="true" static="true"/>
57+
<emptyLine/>
5658
<package name="java" withSubpackages="true" static="false"/>
5759
<emptyLine/>
5860
<package name="javax" withSubpackages="true" static="false"/>
5961
<emptyLine/>
60-
<package name="" withSubpackages="true" static="false"/>
61-
<emptyLine/>
62-
<package name="org.springframework" withSubpackages="true"
63-
static="false"/>
62+
<package name="org" withSubpackages="true" static="false"/>
6463
<emptyLine/>
65-
<package name="" withSubpackages="true" static="true"/>
64+
<package name="org.springframework" withSubpackages="true" static="false"/>
6665
</value>
6766
</option>
6867
<option name="ENABLE_JAVADOC_FORMATTING" value="false"/>
@@ -76,7 +75,7 @@
7675
<value>
7776
<package name="java.util" withSubpackages="false" static="false"/>
7877
<package name="kotlinx.android.synthetic" withSubpackages="false"
79-
static="false"/>
78+
static="false"/>
8079
</value>
8180
</option>
8281
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="20"/>

src/checkstyle/checkstyle-suppressions.xml

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
<suppress files="package-info\.java" checks=".*"/>
77
<suppress files="[\\/]test[\\/]" checks="RequireThis"/>
88
<suppress files="[\\/]test[\\/]" checks="Javadoc*"/>
9-
<suppress files="KafkaMatchersTests" checks="RegexpSinglelineJava"/>
109
<suppress files="Proto" checks=".*"/>
11-
<suppress files="(DeserializationException|ConversionException)" checks="MutableException"/>
12-
<suppress files="[\\/]kafka.jdocs[\\/]" checks="Regexp*"/>
13-
<suppress files="[\\/]kafka.kdocs[\\/]" checks="Regexp*"/>
10+
<suppress files="[\\/]spring-pulsar-docs[\\/]" checks="JavadocPackage|JavadocType|JavadocVariable|SpringDeprecatedCheck" />
11+
<suppress files="[\\/]spring-pulsar-docs[\\/]" checks="SpringJavadoc" message="\@since" />
12+
<suppress files="[\\/]spring-pulsar-docs[\\/].*jooq" checks="AvoidStaticImport" />
1413
</suppressions>

0 commit comments

Comments
 (0)