fix: Fix style configure and some code

This commit is contained in:
qianmoQ 2022-09-20 15:31:03 +08:00
parent 38f355e3a9
commit 2e116662f5
7 changed files with 27 additions and 7 deletions

View File

@ -116,12 +116,16 @@
<module name="HideUtilityClassConstructor" />
<module name="MemberName" />
<module name="LocalVariableName" />
<module name="LocalVariableName">
<property name="format" value="^[a-z][a-zA-Z0-9]*$|^_[a-z][a-zA-Z0-9]*$" />
</module>
<module name="LocalFinalVariableName" />
<module name="TypeName" />
<module name="PackageName" />
<module name="ParameterName" />
<module name="StaticVariableName" />
<module name="StaticVariableName">
<property name="format" value="^[a-z][a-zA-Z0-9]*$|^[A-Z0-9]*$" />
</module>
<module name="ClassTypeParameterName">
<property name="format" value="^[A-Z][0-9]?$" />
</module>

View File

@ -2,4 +2,4 @@
printf "Code verification before submission"
./mvnw clean install checkstyle:checkstyle findbugs:findbugs -X
./mvnw clean install checkstyle:checkstyle findbugs:findbugs -Dskip.npm -X

View File

@ -34,5 +34,13 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>findbugs</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>findbugs</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -1,5 +1,6 @@
package io.edurt.datacap.plugin.jdbc.mysql;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.edurt.datacap.spi.model.Response;
import lombok.extern.slf4j.Slf4j;
@ -11,6 +12,8 @@ import java.util.ArrayList;
import java.util.List;
@Slf4j
@SuppressFBWarnings(value = {"RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"},
justification = "I prefer to suppress these FindBugs warnings")
public class MySQLProcessor
{
private final MySQLConnection connection;

View File

@ -23,6 +23,7 @@
<junit.version>4.13.2</junit.version>
<commons-lang3.version>3.12.0</commons-lang3.version>
<slf4j.version>1.7.36</slf4j.version>
<findbugs.version>3.0.1</findbugs.version>
<plugin.maven.checkstyle.version>3.0.0</plugin.maven.checkstyle.version>
<plugin.maven.findbugs.version>3.0.5</plugin.maven.findbugs.version>
<plugin.maven.compiler.version>3.3</plugin.maven.compiler.version>
@ -81,6 +82,11 @@
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>findbugs</artifactId>
<version>${findbugs.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

View File

@ -1,6 +1,5 @@
package io.edurt.datacap.server.entity;
import io.edurt.datacap.spi.model.Response;
import lombok.Data;
import lombok.ToString;

View File

@ -1,7 +1,7 @@
package io.edurt.datacap.server.service;
import io.edurt.datacap.server.entity.ExecuteEntity;
import org.junit.jupiter.api.Test;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
@ -11,7 +11,7 @@ import org.springframework.test.context.junit4.SpringRunner;
@RunWith(value = SpringRunner.class)
@SpringBootTest
class ExecuteServiceTest
public class ExecuteServiceTest
{
@Autowired
private ExecuteService executeService;
@ -21,7 +21,7 @@ class ExecuteServiceTest
@Sql(value = "classpath:schema/source.sql"),
@Sql(value = "classpath:data/source.sql")
})
void execute()
public void execute()
{
ExecuteEntity configure = new ExecuteEntity();
configure.setPluginName("MySQL");