Skip to content

Commit

Permalink
1、代码格式化统一使用 googleStyle 风格 2、引入代码规范checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
zhp8341 committed Jun 25, 2022
1 parent 317c0ba commit ec9f315
Show file tree
Hide file tree
Showing 208 changed files with 11,521 additions and 11,066 deletions.
25 changes: 9 additions & 16 deletions checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<module name="Checker">
<module name="SuppressionCommentFilter">
</module>

<module name="NewlineAtEndOfFile"/>

Expand All @@ -12,14 +14,12 @@
</module>

<module name="TreeWalker">
<module name="FileContentsHolder"/>
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports" />

<module name="JavadocType">
<property name="allowUnknownTags" value="true"/>
<message key="javadoc.missing" value="Class comments: Missing Javadoc comments."/>
</module>


<module name="LocalFinalVariableName" />
<module name="LocalVariableName" />
Expand All @@ -37,15 +37,15 @@
<module name="ParameterName " />
<module name="ConstantName" />

<module name="ArrayTypeStyle"/>
<!-- <module name="ArrayTypeStyle"/>-->
<module name="UpperEll"/>

<module name="LineLength">
<property name="max" value="140" />
</module>
<module name="MethodLength">
<property name="tokens" value="METHOD_DEF" />
<property name="max" value="50" />
<property name="max" value="90" />
</module>
<module name="ParameterNumber">
<property name="max" value="5" />
Expand Down Expand Up @@ -95,20 +95,13 @@
<module name="NestedIfDepth">
<property name="max" value="3"/>
</module>
<module name="UncommentedMain">
<property name="excludedClasses" value=".*[Application,Test]$"/>
</module>
<module name="Regexp">
<property name="format" value="System\.out\.println"/>
<property name="illegalPattern" value="true"/>
</module>
<module name="ReturnCount">
<property name="max" value="3"/>
<property name="max" value="6"/>
</module>
<module name="NestedTryDepth ">
<property name="max" value="3"/>
<property name="max" value="4"/>
</module>
<module name="SuperClone" />
<!-- <module name="SuperClone" />-->
<module name="SuperFinalize" />

</module>
Expand Down
208 changes: 0 additions & 208 deletions deployer/checkstyle.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,25 @@
*/
public class SystemConstant {

public static final String COMMENT_SYMBOL = "--";
public static final String COMMENT_SYMBOL = "--";

public static final String SEMICOLON = ";";
public static final String SEMICOLON = ";";

public static final String LINE_FEED = "\n";
public static final String LINE_FEED = "\n";

public static final String SPACE = "";
public static final String SPACE = "";

public static final String VIRGULE = "/";
public static final String VIRGULE = "/";

public static final int DEFAULT_PATTERN_FLAGS = Pattern.CASE_INSENSITIVE | Pattern.DOTALL;
public static final int DEFAULT_PATTERN_FLAGS = Pattern.CASE_INSENSITIVE | Pattern.DOTALL;


public static final String JARVERSION = "lib/flink-streaming-core-1.4.0.RELEASE.jar";
public static final String JARVERSION = "lib/flink-streaming-core-1.4.0.RELEASE.jar";


public static final String QUERY_JOBID_KEY_WORD = "job-submitted-success:";

public static final String QUERY_JOBID_KEY_WORD_BACKUP = "Job has been submitted with JobID";
public static final String QUERY_JOBID_KEY_WORD = "job-submitted-success:";

public static final String QUERY_JOBID_KEY_WORD_BACKUP = "Job has been submitted with JobID";


}
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@
*/
public enum CheckPointParameterEnums {

checkpointDir,
checkpointingMode,
checkpointInterval,
checkpointTimeout,
tolerableCheckpointFailureNumber,
asynchronousSnapshots,
externalizedCheckpointCleanup,
stateBackendType,
enableIncremental;
checkpointDir,
checkpointingMode,
checkpointInterval,
checkpointTimeout,
tolerableCheckpointFailureNumber,
asynchronousSnapshots,
externalizedCheckpointCleanup,
stateBackendType,
enableIncremental;

public static void isExits(Set<String> keys) {
for (String key : keys) {
boolean exits = false;
for (CheckPointParameterEnums checkPointParameterEnums : CheckPointParameterEnums.values()) {
if (checkPointParameterEnums.name().equalsIgnoreCase(key)) {
exits = true;
continue;
}
}
if (!exits) {
throw new RuntimeException(key + " 暂时不支持使用");
}
public static void isExits(Set<String> keys) {
for (String key : keys) {
boolean exits = false;
for (CheckPointParameterEnums checkPointParameterEnums : CheckPointParameterEnums.values()) {
if (checkPointParameterEnums.name().equalsIgnoreCase(key)) {
exits = true;
continue;
}
}
if (!exits) {
throw new RuntimeException(key + " 暂时不支持使用");
}
}
}
}
Loading

0 comments on commit ec9f315

Please sign in to comment.