Skip to content

Commit

Permalink
checkstyle change:
Browse files Browse the repository at this point in the history
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".
  • Loading branch information
Xudong Ma committed Apr 7, 2015
1 parent 45682db commit 9aae6f6
Show file tree
Hide file tree
Showing 20 changed files with 22 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
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;

/**
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/grpc/AbstractChannelBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
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;

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/grpc/ChannelImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
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;
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/grpc/DeferredInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/grpc/ServerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
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;
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/grpc/transport/MessageDeframer.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
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;
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/grpc/transport/MessageFramer.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@

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;
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/grpc/transport/ReadableBuffers.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,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;
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/java/io/grpc/ServerImplTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@
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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
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;

Expand Down
2 changes: 1 addition & 1 deletion nano/src/main/java/io/grpc/nano/NanoUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
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.
Expand Down
2 changes: 1 addition & 1 deletion netty/src/main/java/io/grpc/transport/netty/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@

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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@

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;

/**
Expand Down

0 comments on commit 9aae6f6

Please sign in to comment.