Skip to content

Commit

Permalink
[FLINK-6691][checkstyle] Add separate block for scala imports
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed May 24, 2017
1 parent f827d73 commit bf92055
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@

import org.junit.Assert;
import org.junit.Test;
import scala.concurrent.Await;
import scala.concurrent.Future;
import scala.concurrent.duration.Deadline;
import scala.concurrent.duration.FiniteDuration;

import javax.management.MBeanServer;
import javax.management.ObjectName;
Expand All @@ -46,6 +42,11 @@
import java.util.Set;
import java.util.concurrent.TimeUnit;

import scala.concurrent.Await;
import scala.concurrent.Future;
import scala.concurrent.duration.Deadline;
import scala.concurrent.duration.FiniteDuration;

import static org.junit.Assert.assertEquals;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
import org.apache.flink.api.java.typeutils.runtime.FieldSerializer;
import org.apache.flink.api.java.typeutils.runtime.TupleSerializerBase;

import scala.Product;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.lang.reflect.Array;
import java.lang.reflect.Field;

import scala.Product;

import static org.apache.flink.util.Preconditions.checkNotNull;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@

import org.junit.Assert;
import org.junit.Test;
import scala.concurrent.duration.Deadline;
import scala.concurrent.duration.FiniteDuration;

import java.io.Serializable;
import java.util.ArrayList;
Expand All @@ -76,6 +74,9 @@
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.TimeUnit;

import scala.concurrent.duration.Deadline;
import scala.concurrent.duration.FiniteDuration;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import scala.concurrent.Await;
import scala.concurrent.Future;
import scala.concurrent.duration.Deadline;
import scala.concurrent.duration.FiniteDuration;
import scala.concurrent.impl.Promise;

import java.io.Closeable;
import java.io.IOException;
Expand All @@ -122,6 +117,12 @@
import java.util.concurrent.RunnableFuture;
import java.util.concurrent.TimeUnit;

import scala.concurrent.Await;
import scala.concurrent.Future;
import scala.concurrent.duration.Deadline;
import scala.concurrent.duration.FiniteDuration;
import scala.concurrent.impl.Promise;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
Expand Down
4 changes: 2 additions & 2 deletions tools/maven/strict-checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ This file is based on the checkstyle file of Apache Beam.
<module name="ImportOrder">
<!-- Checks for out of order import statements. -->
<property name="severity" value="error"/>
<!-- Flink imports first, then other imports, then javax and java imports, then static imports. -->
<property name="groups" value="org.apache.flink,*,javax,java"/>
<!-- Flink imports first, then other imports, then javax, java and scala imports, then static imports. -->
<property name="groups" value="org.apache.flink,*,javax,java,scala"/>
<property name="separated" value="true"/>
<property name="sortStaticImportsAlphabetically" value="true"/>
<property name="option" value="bottom"/>
Expand Down

0 comments on commit bf92055

Please sign in to comment.