Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: styleguide/java/java.md

Issue 2738523002: Add importorder to Java styleguide. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: styleguide/java/java.md
diff --git a/styleguide/java/java.md b/styleguide/java/java.md
index 0567689a48e2e17ed172a2c3e2f9263c9a4fceea..76d5f753353b8d98095236421e3d328fbba06aac 100644
--- a/styleguide/java/java.md
+++ b/styleguide/java/java.md
@@ -124,6 +124,27 @@ if (org.chromium.base.BuildConfig.DCHECK_IS_ON) {
}
```
+### Import Order
+
+* Static imports go before other imports.
+* Each import group must be separated by an empty line.
+
+This is the order of the import groups:
+
+1. android
+1. com (except com.google.android.apps.chrome)
+1. dalvik
+1. junit
+1. org
+1. com.google.android.apps.chrome
+1. org.chromium
+1. java
+1. javax
+
+This is enforced by the
+[Chromium Checkstyle configuration](../../tools/android/checkstyle/chromium-style-5.0.xml)
+under the ImportOrder module.
+
## Location
"Top level directories" are defined as directories with a GN file, such as
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698