Skip to content

Commit ec9f315

Browse files
committed
1、代码格式化统一使用 googleStyle 风格 2、引入代码规范checkstyle
1 parent 317c0ba commit ec9f315

File tree

208 files changed

+11521
-11066
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+11521
-11066
lines changed

checkstyle.xml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
55

66
<module name="Checker">
7+
<module name="SuppressionCommentFilter">
8+
</module>
79

810
<module name="NewlineAtEndOfFile"/>
911

@@ -12,14 +14,12 @@
1214
</module>
1315

1416
<module name="TreeWalker">
17+
<module name="FileContentsHolder"/>
1518
<module name="IllegalImport"/>
1619
<module name="RedundantImport"/>
1720
<module name="UnusedImports" />
1821

19-
<module name="JavadocType">
20-
<property name="allowUnknownTags" value="true"/>
21-
<message key="javadoc.missing" value="Class comments: Missing Javadoc comments."/>
22-
</module>
22+
2323

2424
<module name="LocalFinalVariableName" />
2525
<module name="LocalVariableName" />
@@ -37,15 +37,15 @@
3737
<module name="ParameterName " />
3838
<module name="ConstantName" />
3939

40-
<module name="ArrayTypeStyle"/>
40+
<!-- <module name="ArrayTypeStyle"/>-->
4141
<module name="UpperEll"/>
4242

4343
<module name="LineLength">
4444
<property name="max" value="140" />
4545
</module>
4646
<module name="MethodLength">
4747
<property name="tokens" value="METHOD_DEF" />
48-
<property name="max" value="50" />
48+
<property name="max" value="90" />
4949
</module>
5050
<module name="ParameterNumber">
5151
<property name="max" value="5" />
@@ -95,20 +95,13 @@
9595
<module name="NestedIfDepth">
9696
<property name="max" value="3"/>
9797
</module>
98-
<module name="UncommentedMain">
99-
<property name="excludedClasses" value=".*[Application,Test]$"/>
100-
</module>
101-
<module name="Regexp">
102-
<property name="format" value="System\.out\.println"/>
103-
<property name="illegalPattern" value="true"/>
104-
</module>
10598
<module name="ReturnCount">
106-
<property name="max" value="3"/>
99+
<property name="max" value="6"/>
107100
</module>
108101
<module name="NestedTryDepth ">
109-
<property name="max" value="3"/>
102+
<property name="max" value="4"/>
110103
</module>
111-
<module name="SuperClone" />
104+
<!-- <module name="SuperClone" />-->
112105
<module name="SuperFinalize" />
113106

114107
</module>

deployer/checkstyle.xml

Lines changed: 0 additions & 208 deletions
This file was deleted.

flink-streaming-commom/src/main/java/com/flink/streaming/common/constant/SystemConstant.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,25 @@
1010
*/
1111
public class SystemConstant {
1212

13-
public static final String COMMENT_SYMBOL = "--";
13+
public static final String COMMENT_SYMBOL = "--";
1414

15-
public static final String SEMICOLON = ";";
15+
public static final String SEMICOLON = ";";
1616

17-
public static final String LINE_FEED = "\n";
17+
public static final String LINE_FEED = "\n";
1818

19-
public static final String SPACE = "";
19+
public static final String SPACE = "";
2020

21-
public static final String VIRGULE = "/";
21+
public static final String VIRGULE = "/";
2222

23-
public static final int DEFAULT_PATTERN_FLAGS = Pattern.CASE_INSENSITIVE | Pattern.DOTALL;
23+
public static final int DEFAULT_PATTERN_FLAGS = Pattern.CASE_INSENSITIVE | Pattern.DOTALL;
2424

2525

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

2828

29-
public static final String QUERY_JOBID_KEY_WORD = "job-submitted-success:";
30-
31-
public static final String QUERY_JOBID_KEY_WORD_BACKUP = "Job has been submitted with JobID";
29+
public static final String QUERY_JOBID_KEY_WORD = "job-submitted-success:";
3230

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

3433

3534
}

flink-streaming-commom/src/main/java/com/flink/streaming/common/enums/CheckPointParameterEnums.java

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@
1010
*/
1111
public enum CheckPointParameterEnums {
1212

13-
checkpointDir,
14-
checkpointingMode,
15-
checkpointInterval,
16-
checkpointTimeout,
17-
tolerableCheckpointFailureNumber,
18-
asynchronousSnapshots,
19-
externalizedCheckpointCleanup,
20-
stateBackendType,
21-
enableIncremental;
13+
checkpointDir,
14+
checkpointingMode,
15+
checkpointInterval,
16+
checkpointTimeout,
17+
tolerableCheckpointFailureNumber,
18+
asynchronousSnapshots,
19+
externalizedCheckpointCleanup,
20+
stateBackendType,
21+
enableIncremental;
2222

23-
public static void isExits(Set<String> keys) {
24-
for (String key : keys) {
25-
boolean exits = false;
26-
for (CheckPointParameterEnums checkPointParameterEnums : CheckPointParameterEnums.values()) {
27-
if (checkPointParameterEnums.name().equalsIgnoreCase(key)) {
28-
exits = true;
29-
continue;
30-
}
31-
}
32-
if (!exits) {
33-
throw new RuntimeException(key + " 暂时不支持使用");
34-
}
23+
public static void isExits(Set<String> keys) {
24+
for (String key : keys) {
25+
boolean exits = false;
26+
for (CheckPointParameterEnums checkPointParameterEnums : CheckPointParameterEnums.values()) {
27+
if (checkPointParameterEnums.name().equalsIgnoreCase(key)) {
28+
exits = true;
29+
continue;
3530
}
31+
}
32+
if (!exits) {
33+
throw new RuntimeException(key + " 暂时不支持使用");
34+
}
3635
}
36+
}
3737
}

0 commit comments

Comments
 (0)