checkstyle change:

1. Adds <property name="separateLineBetweenGroups" value="true"/> to CustomImportOrder to enfore blank line between imports groups.
2. Uses checkstyle 6.5, which fixed a bug of "CustomImportOrder checks import sorting according to ASCII order instead of case-insensitive alphabetical order".
This commit is contained in:
Xudong Ma 2015-04-06 21:04:56 +08:00
parent 45682dbc18
commit 9aae6f65fa
20 changed files with 22 additions and 21 deletions

View File

@ -61,8 +61,8 @@ import java.util.List;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.logging.Logger;
/**

View File

@ -90,7 +90,7 @@ subprojects {
checkstyle {
configFile = file("$rootDir/checkstyle.xml")
toolVersion = "6.2"
toolVersion = "6.5"
ignoreFailures = true
if (rootProject.hasProperty("checkstyle.ignoreFailures")) {
ignoreFailures = rootProject.properties["checkstyle.ignoreFailures"].toBoolean()

View File

@ -165,6 +165,7 @@
<property name="specialImportsRegExp" value="com.google"/>
<property name="sortImportsInGroupAlphabetically" value="true"/>
<property name="customImportOrderRules" value="STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
<property name="separateLineBetweenGroups" value="true"/>
</module>
<module name="MethodParamPad"/>
<module name="OperatorWrap">

View File

@ -37,8 +37,8 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder;
import io.grpc.SharedResourceHolder.Resource;
import io.grpc.transport.ClientTransportFactory;
import java.util.concurrent.Executors;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import javax.annotation.Nullable;

View File

@ -39,8 +39,8 @@ import io.grpc.transport.ClientStreamListener;
import io.grpc.transport.ClientTransport;
import io.grpc.transport.ClientTransportFactory;
import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.concurrent.ExecutorService;

View File

@ -31,8 +31,8 @@
package io.grpc;
import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import javax.annotation.Nullable;

View File

@ -41,8 +41,8 @@ import io.grpc.transport.ServerStream;
import io.grpc.transport.ServerStreamListener;
import io.grpc.transport.ServerTransportListener;
import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collection;
import java.util.HashSet;
import java.util.concurrent.Executor;

View File

@ -36,8 +36,8 @@ import com.google.common.base.Preconditions;
import io.grpc.Status;
import java.io.Closeable;
import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.GZIPInputStream;
import javax.annotation.concurrent.NotThreadSafe;

View File

@ -40,8 +40,8 @@ import io.grpc.DeferredInputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.ByteBuffer;
import java.util.zip.GZIPOutputStream;

View File

@ -35,8 +35,8 @@ import static com.google.common.base.Charsets.UTF_8;
import com.google.common.base.Preconditions;
import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;

View File

@ -64,13 +64,13 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;

View File

@ -51,8 +51,8 @@ import org.junit.runners.JUnit4;
import org.mockito.ArgumentCaptor;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.zip.GZIPOutputStream;

View File

@ -31,8 +31,8 @@
package io.grpc.examples.routeguide;
import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;

View File

@ -45,8 +45,8 @@ import io.grpc.testing.integration.Messages.StreamingInputCallResponse;
import io.grpc.testing.integration.Messages.StreamingOutputCallRequest;
import io.grpc.testing.integration.Messages.StreamingOutputCallResponse;
import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Random;

View File

@ -41,8 +41,8 @@ import org.junit.Assert;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;
import java.util.List;

View File

@ -38,8 +38,8 @@ import com.google.protobuf.nano.MessageNano;
import io.grpc.Marshaller;
import io.grpc.Status;
import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
/**
* Utility methods for using nano proto with grpc.

View File

@ -50,8 +50,8 @@ import io.netty.util.concurrent.GenericFutureListener;
import java.nio.ByteBuffer;
import java.util.Map;
import java.util.concurrent.Executors;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
/**

View File

@ -34,8 +34,8 @@ package io.grpc.transport.netty;
import static com.google.common.base.Charsets.UTF_8;
import static io.grpc.transport.netty.Utils.CONTENT_TYPE_GRPC;
import static io.grpc.transport.netty.Utils.CONTENT_TYPE_HEADER;
import static io.grpc.transport.netty.Utils.HTTP_METHOD;
import static io.grpc.transport.netty.Utils.HTTPS;
import static io.grpc.transport.netty.Utils.HTTP_METHOD;
import static io.grpc.transport.netty.Utils.STATUS_OK;
import static io.grpc.transport.netty.Utils.TE_HEADER;
import static io.grpc.transport.netty.Utils.TE_TRAILERS;

View File

@ -40,8 +40,8 @@ import io.grpc.SharedResourceHolder.Resource;
import io.grpc.transport.ClientTransportFactory;
import java.net.InetSocketAddress;
import java.util.concurrent.Executors;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import javax.net.ssl.SSLSocketFactory;

View File

@ -73,17 +73,17 @@ import org.mockito.MockitoAnnotations;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.net.Socket;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executors;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
/**