Skip to content

Commit 8330f6b

Browse files
authored
Merge branch 'master' into Scores_Support
2 parents 77b82b0 + 2d5eb6c commit 8330f6b

File tree

107 files changed

+1378
-930
lines changed

Some content is hidden

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

107 files changed

+1378
-930
lines changed

.editorconfig

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

checkstyle.xml

Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
~ Licensed to the Apache Software Foundation (ASF) under one or more
4+
~ contributor license agreements. See the NOTICE file distributed with
5+
~ this work for additional information regarding copyright ownership.
6+
~ The ASF licenses this file to You under the Apache License, Version 2.0
7+
~ (the "License"); you may not use this file except in compliance with
8+
~ the License. You may obtain a copy of the License at
9+
~
10+
~ http://www.apache.org/licenses/LICENSE-2.0
11+
~
12+
~ Unless required by applicable law or agreed to in writing, software
13+
~ distributed under the License is distributed on an "AS IS" BASIS,
14+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
~ See the License for the specific language governing permissions and
16+
~ limitations under the License.
17+
-->
18+
19+
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd">
20+
<module name = "Checker">
21+
<property name="charset" value="UTF-8"/>
22+
<property name="severity" value="error"/>
23+
<property name="fileExtensions" value="java, properties, xml"/>
24+
<module name="Header">
25+
<property name="fileExtensions" value="java"/>
26+
</module>
27+
<module name="FileTabCharacter">
28+
<property name="eachLine" value="true"/>
29+
</module>
30+
<module name="FileLength"/>
31+
<module name="NewlineAtEndOfFile">
32+
<property name="lineSeparator" value="lf"/>
33+
</module>
34+
<module name="Translation"/>
35+
<module name="UniqueProperties"/>
36+
<module name="SeverityMatchFilter"/>
37+
38+
<module name="RegexpSingleline">
39+
<property name="format" value="System\.out\.println"/>
40+
<property name="message" value="Prohibit invoking System.out.println in source code !"/>
41+
</module>
42+
43+
<module name="TreeWalker">
44+
45+
<!-- Naming Conventions -->
46+
<module name="PackageName">
47+
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
48+
</module>
49+
<module name="TypeName"/>
50+
<module name="MethodName"/>
51+
<module name="InterfaceTypeParameterName"/>
52+
<module name="ClassTypeParameterName"/>
53+
<module name="MethodTypeParameterName"/>
54+
<module name="ConstantName"/>
55+
<module name="StaticVariableName"/>
56+
<module name="MemberName"/>
57+
<module name="LocalVariableName"/>
58+
<module name="LocalFinalVariableName"/>
59+
<module name="ParameterName"/>
60+
<module name="CatchParameterName"/>
61+
<module name="AbbreviationAsWordInName">
62+
<property name="allowedAbbreviationLength" value="6"/>
63+
</module>
64+
65+
<!-- Size Violations -->
66+
<module name="AnonInnerLength"/>
67+
<module name="MethodLength"/>
68+
<module name="LineLength">
69+
<property name="max" value="200"/>
70+
</module>
71+
<module name="OuterTypeNumber"/>
72+
73+
<!-- Whitespace -->
74+
<module name="EmptyForInitializerPad"/>
75+
<module name="EmptyForIteratorPad"/>
76+
<module name="MethodParamPad"/>
77+
<module name="ParenPad"/>
78+
<module name="TypecastParenPad"/>
79+
<module name="NoLineWrap"/>
80+
<module name="OperatorWrap"/>
81+
<module name="SeparatorWrap">
82+
<property name="id" value="SeparatorWrapDot"/>
83+
<property name="tokens" value="DOT"/>
84+
<property name="option" value="nl"/>
85+
</module>
86+
<module name="SeparatorWrap">
87+
<property name="id" value="SeparatorWrapComma"/>
88+
<property name="tokens" value="COMMA"/>
89+
<property name="option" value="EOL"/>
90+
</module>
91+
<module name="SeparatorWrap">
92+
<property name="id" value="SeparatorWrapEllipsis"/>
93+
<property name="tokens" value="ELLIPSIS"/>
94+
<property name="option" value="EOL"/>
95+
</module>
96+
<module name="SeparatorWrap">
97+
<property name="id" value="SeparatorWrapArrayDeclarator"/>
98+
<property name="tokens" value="ARRAY_DECLARATOR"/>
99+
<property name="option" value="EOL"/>
100+
</module>
101+
<module name="SeparatorWrap">
102+
<property name="id" value="SeparatorWrapMethodRef"/>
103+
<property name="tokens" value="METHOD_REF"/>
104+
<property name="option" value="nl"/>
105+
</module>
106+
<module name="GenericWhitespace"/>
107+
<module name="NoWhitespaceBefore"/>
108+
<module name="NoWhitespaceAfter"/>
109+
<module name="WhitespaceAround"/>
110+
<module name="WhitespaceAfter"/>
111+
<module name="SingleSpaceSeparator"/>
112+
<module name="EmptyLineSeparator">
113+
<property name="allowNoEmptyLineBetweenFields" value="true"/>
114+
<property name="allowMultipleEmptyLines" value="false"/>
115+
<property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
116+
</module>
117+
118+
<!-- Imports -->
119+
<module name="AvoidStarImport"/>
120+
<module name="IllegalImport"/>
121+
<module name="RedundantImport"/>
122+
<module name="UnusedImports"/>
123+
<module name="CustomImportOrder"/>
124+
125+
<!-- Annotations -->
126+
<module name="AnnotationLocation">
127+
<property name="id" value="AnnotationLocationMostCases"/>
128+
<property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
129+
</module>
130+
<module name="AnnotationLocation">
131+
<property name="id" value="AnnotationLocationVariables"/>
132+
<property name="tokens" value="VARIABLE_DEF"/>
133+
<property name="allowSamelineMultipleAnnotations" value="true"/>
134+
</module>
135+
<module name="AnnotationUseStyle"/>
136+
<module name="MissingOverride"/>
137+
<module name="SuppressWarnings"/>
138+
<module name="MissingDeprecated"/>
139+
<module name="SuppressWarningsHolder"/>
140+
141+
<!-- Modifiers -->
142+
<module name="ModifierOrder"/>
143+
<module name="RedundantModifier"/>
144+
145+
<!-- Coding -->
146+
<module name="ArrayTrailingComma"/>
147+
<module name="CovariantEquals"/>
148+
<module name="DefaultComesLast"/>
149+
<module name="DeclarationOrder"/>
150+
<module name="EmptyStatement"/>
151+
<module name="EqualsAvoidNull"/>
152+
<module name="ExplicitInitialization"/>
153+
<module name="FallThrough"/>
154+
<module name="IllegalInstantiation"/>
155+
<module name="IllegalCatch">
156+
<property name="illegalClassNames" value="Error,Throwable,java.lang.Error,java.lang.Throwable" />
157+
</module>
158+
<module name="IllegalThrows"/>
159+
<module name="IllegalType">
160+
<property name="tokens" value="METHOD_DEF,PARAMETER_DEF,VARIABLE_DEF"/>
161+
</module>
162+
<module name="IllegalTokenText">
163+
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
164+
<property name="format" value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
165+
<property name="message" value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
166+
</module>
167+
<module name="MissingSwitchDefault"/>
168+
<module name="ModifiedControlVariable"/>
169+
<module name="MultipleVariableDeclarations"/>
170+
<module name="NestedIfDepth">
171+
<property name="max" value="3"/>
172+
</module>
173+
<module name="NestedTryDepth"/>
174+
<module name="NoClone"/>
175+
<module name="NoFinalizer"/>
176+
<module name="SuperClone"/>
177+
<module name="SuperFinalize"/>
178+
<module name="OneStatementPerLine"/>
179+
<module name="PackageDeclaration"/>
180+
<module name="ParameterAssignment"/>
181+
<module name="SimplifyBooleanExpression"/>
182+
<module name="SimplifyBooleanReturn"/>
183+
<module name="StringLiteralEquality"/>
184+
<module name="UnnecessaryParentheses"/>
185+
<module name="VariableDeclarationUsageDistance"/>
186+
187+
<!-- Block Checks -->
188+
<module name="EmptyBlock"/>
189+
<module name="AvoidNestedBlocks"/>
190+
<module name="NeedBraces"/>
191+
<module name="LeftCurly"/>
192+
<module name="RightCurly"/>
193+
194+
<!-- Class Design -->
195+
<module name="FinalClass"/>
196+
<!-- cannot recognize for lombok @NoArgsConstructor(access = AccessLevel.PRIVATE), just ignore -->
197+
<!--<module name="HideUtilityClassConstructor"/>-->
198+
<module name="OneTopLevelClass"/>
199+
<module name="InnerTypeLast"/>
200+
<module name="VisibilityModifier"/>
201+
<module name="MutableException"/>
202+
<module name="ThrowsCount"/>
203+
204+
<!-- Miscellaneous -->
205+
<module name="ArrayTypeStyle"/>
206+
<module name="UpperEll"/>
207+
<module name="AvoidEscapedUnicodeCharacters"/>
208+
<module name="DescendantToken"/>
209+
<module name="Indentation"/>
210+
<module name="OuterTypeFilename"/>
211+
<module name="TodoComment"/>
212+
<module name="TrailingComment"/>
213+
214+
<!-- Filters -->
215+
<module name="SuppressionCommentFilter"/>
216+
<module name="SuppressWithNearbyCommentFilter"/>
217+
</module>
218+
</module>

commons/src/main/java/io/github/dengliming/redismodule/common/util/ArgsUtil.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package io.github.dengliming.redismodule.common.util;
1718

1819
import java.util.ArrayList;

commons/src/main/java/io/github/dengliming/redismodule/common/util/RAssert.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package io.github.dengliming.redismodule.common.util;
1718

1819
import java.util.Map;

pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
<surefire-plugin.version>3.0.0-M3</surefire-plugin.version>
6262
<assertj-core.version>3.17.2</assertj-core.version>
6363
<hamcrest-library.version>2.2</hamcrest-library.version>
64+
<maven-checkstyle-plugin.version>3.1.0</maven-checkstyle-plugin.version>
6465
</properties>
6566

6667
<dependencyManagement>
@@ -206,6 +207,25 @@
206207
</executions>
207208
</plugin>
208209

210+
<plugin>
211+
<groupId>org.apache.maven.plugins</groupId>
212+
<artifactId>maven-checkstyle-plugin</artifactId>
213+
<version>${maven-checkstyle-plugin.version}</version>
214+
<configuration>
215+
<configLocation>/checkstyle.xml</configLocation>
216+
<includeTestSourceDirectory>true</includeTestSourceDirectory>
217+
</configuration>
218+
<executions>
219+
<execution>
220+
<id>validate</id>
221+
<phase>validate</phase>
222+
<goals>
223+
<goal>check</goal>
224+
</goals>
225+
</execution>
226+
</executions>
227+
</plugin>
228+
209229
<plugin>
210230
<groupId>org.apache.maven.plugins</groupId>
211231
<artifactId>maven-surefire-plugin</artifactId>

redisai/src/main/java/io/github/dengliming/redismodule/redisai/Backend.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package io.github.dengliming.redismodule.redisai;
1718

1819
/**

redisai/src/main/java/io/github/dengliming/redismodule/redisai/DataType.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package io.github.dengliming.redismodule.redisai;
1718

1819
/**

redisai/src/main/java/io/github/dengliming/redismodule/redisai/Device.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package io.github.dengliming.redismodule.redisai;
1718

1819
/**

0 commit comments

Comments
 (0)