Skip to content

Commit dd718e0

Browse files
committed
Checkstyle fixes.
I modify the checkstyle config to have SAME_PACKAGE imports appear before third-party imports. I think this better matches the intent of the import ordering rules in the style guide. https://google.github.io/styleguide/javaguide.html#s3.3.3-import-ordering-and-spacing Expecially since it says the `com.google` imports only appear after static imports if the source file is in the `com.google` package space.
1 parent 15930b4 commit dd718e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

google-checks.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@
167167
</module>
168168
<module name="OverloadMethodsDeclarationOrder"/>
169169
<module name="CustomImportOrder">
170-
<property name="specialImportsRegExp" value="com.google"/>
170+
<property name="specialImportsRegExp" value="^javax\."/>
171171
<property name="sortImportsInGroupAlphabetically" value="true"/>
172-
<property name="customImportOrderRules" value="STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
172+
<property name="customImportOrderRules" value="STATIC###SAME_PACKAGE(2)###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE###SPECIAL_IMPORTS"/>
173173
</module>
174174
<module name="MethodParamPad"/>
175175
<module name="OperatorWrap">

0 commit comments

Comments
 (0)