[Improvement][Style] Update spotless junit4 check scope (#12450)

This commit is contained in:
Eric Gao 2022-10-20 12:12:17 +08:00 committed by GitHub
parent 0eef2e3e10
commit 0a6e8af864
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 9 deletions

View File

@ -117,8 +117,17 @@ public abstract class AbstractBaseBenchmark {
}
private static int getForks() {
String value = System.getProperty("forkCount");
return null != value ? Integer.parseInt(value) : -1;
}
String forkCount = System.getProperty("forkCount");
if (forkCount == null) {
return -1;
}
try {
return Integer.parseInt(forkCount);
} catch (NumberFormatException e) {
logger.error("fail to convert forkCount into int", e);
}
return -1;
}
}

View File

@ -640,11 +640,6 @@
<version>${spotless.version}</version>
<configuration>
<java>
<!--TODO: Remove the following excludes section when junit4 removed from e2e and microbench module-->
<excludes>
<exclude>**/e2e/**/*.java</exclude>
<exclude>**/microbench/**/*.java</exclude>
</excludes>
<eclipse>
<file>style/spotless_dolphinscheduler_formatter.xml</file>
</eclipse>
@ -693,7 +688,6 @@
<include>docs/**/*.md</include>
</includes>
<excludes>
<!--Avoid conflicts with formatting tools in some special modules-->
<exclude>**/.github/**/*.md</exclude>
</excludes>
<flexmark />