Skip to content

Commit

Permalink
Update import order in IDEA code style
Browse files Browse the repository at this point in the history
  • Loading branch information
onobc committed Oct 13, 2022
1 parent afe4fb6 commit aa4c154
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
5 changes: 1 addition & 4 deletions CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ Active contributors might be asked to join the core team, and given the ability
None of these is essential for a pull request, but they will all help. They can also be
added after the original pull request but before a merge.

* We use the https://github.com/spring-io/spring-javaformat/[Spring JavaFormat] project to apply code formatting conventions.
If you use Eclipse and you follow the '`Importing into eclipse`' instructions below you should get project specific formatting automatically.
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`.
// 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.
* 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].
* The build includes Checkstyle rules for many of our code conventions. Run `./gradlew checkstyleMain checkstyleTest` if you want to check your changes are compliant.
* 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.
* Add the ASF license header comment to all new `.java` files (copy from existing files in the project).
Expand Down
13 changes: 6 additions & 7 deletions idea/codeStyleConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<package name="" withSubpackages="true" static="false"/>
<emptyLine/>
<package name="org.springframework" withSubpackages="true"
static="false"/>
static="false"/>
<emptyLine/>
<package name="" withSubpackages="true" static="true"/>
</value>
Expand All @@ -53,16 +53,15 @@
</option>
<option name="IMPORT_LAYOUT_TABLE">
<value>
<package name="" withSubpackages="true" static="true"/>
<emptyLine/>
<package name="java" withSubpackages="true" static="false"/>
<emptyLine/>
<package name="javax" withSubpackages="true" static="false"/>
<emptyLine/>
<package name="" withSubpackages="true" static="false"/>
<emptyLine/>
<package name="org.springframework" withSubpackages="true"
static="false"/>
<package name="org" withSubpackages="true" static="false"/>
<emptyLine/>
<package name="" withSubpackages="true" static="true"/>
<package name="org.springframework" withSubpackages="true" static="false"/>
</value>
</option>
<option name="ENABLE_JAVADOC_FORMATTING" value="false"/>
Expand All @@ -76,7 +75,7 @@
<value>
<package name="java.util" withSubpackages="false" static="false"/>
<package name="kotlinx.android.synthetic" withSubpackages="false"
static="false"/>
static="false"/>
</value>
</option>
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="20"/>
Expand Down
7 changes: 3 additions & 4 deletions src/checkstyle/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
<suppress files="package-info\.java" checks=".*"/>
<suppress files="[\\/]test[\\/]" checks="RequireThis"/>
<suppress files="[\\/]test[\\/]" checks="Javadoc*"/>
<suppress files="KafkaMatchersTests" checks="RegexpSinglelineJava"/>
<suppress files="Proto" checks=".*"/>
<suppress files="(DeserializationException|ConversionException)" checks="MutableException"/>
<suppress files="[\\/]kafka.jdocs[\\/]" checks="Regexp*"/>
<suppress files="[\\/]kafka.kdocs[\\/]" checks="Regexp*"/>
<suppress files="[\\/]spring-pulsar-docs[\\/]" checks="JavadocPackage|JavadocType|JavadocVariable|SpringDeprecatedCheck" />
<suppress files="[\\/]spring-pulsar-docs[\\/]" checks="SpringJavadoc" message="\@since" />
<suppress files="[\\/]spring-pulsar-docs[\\/].*jooq" checks="AvoidStaticImport" />
</suppressions>

0 comments on commit aa4c154

Please sign in to comment.