Skip to content

Commit

Permalink
pass checkstyle plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
fangjian0423 committed Oct 28, 2019
1 parent 16e9494 commit de9b1be
Show file tree
Hide file tree
Showing 16 changed files with 84 additions and 13 deletions.
8 changes: 8 additions & 0 deletions eclipse/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
<suppressions>
<suppress files="[\\/]spring-cloud-alibaba-examples[\\/]" checks="HideUtilityClassConstructorCheck" />
<suppress files=".*" checks="LineLength" />
</suppressions>
18 changes: 18 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,24 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<executions>
<execution>
<id>checkstyle-validation</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<!-- Checkstyle rules inherited from spring-cloud-build -->
<suppressionsLocation>eclipse/checkstyle-suppressions.xml</suppressionsLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<failOnViolation>true</failOnViolation>
<violationSeverity>warning</violationSeverity>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.springframework.boot.test.context.SpringBootTest;

/**
* {@link DubboServiceRegistrationAutoConfiguration} Test
* {@link DubboServiceRegistrationAutoConfiguration} Test.
*
* @author <a href="mailto:[email protected]">Mercy</a>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.springframework.http.MediaType;

/**
* {@link AbstractMediaTypeExpression} Test
* {@link AbstractMediaTypeExpression} Test.
*
* @author <a href="mailto:[email protected]">Mercy</a>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
@SpringBootApplication
public class OssApplication {

/**
* Bucket Name of OSS Example.
*/
public static final String BUCKET_NAME = "spring-cloud-alibaba-test";

public static void main(String[] args) throws URISyntaxException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,29 @@

public class Order implements Serializable {

/**
* order id.
*/
public long id;

/**
* user id.
*/
public String userId;

/**
* commodity code.
*/
public String commodityCode;

/**
* count.
*/
public int count;

/**
* money.
*/
public int money;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,29 @@

public class Order implements Serializable {

/**
* id.
*/
public long id;

/**
* user id.
*/
public String userId;

/**
* commodity code.
*/
public String commodityCode;

/**
* count.
*/
public int count;

/**
* money.
*/
public int money;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
/**
* @author fangjian
*/
public class ExceptionUtil {
public final class ExceptionUtil {

private ExceptionUtil() {

}

public static SentinelClientHttpResponse handleException(HttpRequest request,
byte[] body, ClientHttpRequestExecution execution, BlockException ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class EchoServiceFallback implements EchoService {
}

/**
* 调用服务提供方的输出接口
* 调用服务提供方的输出接口.
* @param str 用户输入
* @return
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
public interface EchoService {

/**
* 调用服务提供方的输出接口
* 调用服务提供方的输出接口.
* @param str 用户输入
* @return
* @return echo result
*/
@GetMapping("/echo/{str}")
String echo(@PathVariable("str") String str);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static void main(String[] args) {
private ObjectMapper objectMapper;

/**
* Publish the {@link UserRemoteApplicationEvent}
* Publish the {@link UserRemoteApplicationEvent}.
* @param name the user name
* @param destination the destination
* @return If published
Expand All @@ -82,7 +82,7 @@ public boolean publish(@RequestParam String name,
}

/**
* Listener on the {@link UserRemoteApplicationEvent}
* Listener on the {@link UserRemoteApplicationEvent}.
* @param event {@link UserRemoteApplicationEvent}
*/
@EventListener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.springframework.context.annotation.Bean;

/**
* Nacos Config Server Bootstrap
* Nacos Config Server Bootstrap.
*
* @author <a href="mailto:[email protected]">Mercy</a>
* @since 0.2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
/**
* @author xiaojing
*/
public class NacosMockTest {
public final class NacosMockTest {

private NacosMockTest() {

}

public static Instance serviceInstance(String serviceName, boolean isHealthy,
Map<String, String> metadata) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import static org.assertj.core.api.Assertions.assertThat;

/**
* Add this unit test to verify https://github.com/alibaba/spring-cloud-alibaba/pull/838
* Add this unit test to verify https://github.com/alibaba/spring-cloud-alibaba/pull/838.
*
* @author <a href="mailto:[email protected]">Jim</a>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
/**
* @author xiaojing
*/
public class AnsMockTest {
public final class AnsMockTest {

private AnsMockTest() {

}

public static Host hostInstance(String serviceName, boolean valid,
Map<String, String> metadata) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import static org.assertj.core.api.Assertions.assertThat;

/**
* {@link OSS} {@link OssProperties} Test
* {@link OSS} {@link OssProperties} Test.
*
* @author <a href="mailto:[email protected]">Jim</a>
*/
Expand Down

0 comments on commit de9b1be

Please sign in to comment.