Skip to content

Commit 553a663

Browse files
committed
java-style: Fix the style
Signed-off-by: Ce Gao <[email protected]>
1 parent 7843f91 commit 553a663

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

java-style.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
value="Type name ''{0}'' must match pattern ''{1}''."/>
9898
</module>
9999
<module name="MemberName">
100-
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
100+
<property name="format" value="^[a-z0-9][a-zA-Z0-9]*$"/>
101101
<message key="name.invalidPattern"
102102
value="Member name ''{0}'' must match pattern ''{1}''."/>
103103
</module>
@@ -113,7 +113,7 @@
113113
</module>
114114
<module name="LocalVariableName">
115115
<property name="tokens" value="VARIABLE_DEF"/>
116-
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
116+
<property name="format" value="^[a-z0-9][a-zA-Z0-9]*$"/>
117117
<property name="allowOneCharVarInForLoop" value="true"/>
118118
<message key="name.invalidPattern"
119119
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
@@ -175,7 +175,7 @@
175175
<property name="tokens" value="VARIABLE_DEF"/>
176176
<property name="allowSamelineMultipleAnnotations" value="true"/>
177177
</module>
178-
<module name="NonEmptyAtclauseDescription"/>
178+
<!--<module name="NonEmptyAtclauseDescription"/>-->
179179
<module name="JavadocTagContinuationIndentation"/>
180180
<module name="SummaryJavadoc">
181181
<property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>

src/rprocessing/IOUtil.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ public ResourceReader(final Class<?> clazz) {
3131

3232
/**
3333
* read text from the resource
34-
*
35-
* @param resource
36-
* @return
37-
* @throws IOException
3834
*/
3935
public String readText(final String resource) throws IOException {
4036
return IOUtil.readResourceAsText(clazz, resource);

src/rprocessing/mode/RLangEditor.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,6 @@ public String getId() {
7373
return id;
7474
}
7575

76-
/**
77-
* @param base
78-
* @param path
79-
* @param state
80-
* @param mode
81-
* @throws EditorException
82-
*/
8376
protected RLangEditor(Base base, String path, EditorState state, Mode mode)
8477
throws EditorException {
8578
super(base, path, state, mode);

src/rprocessing/mode/RLangTokenMarker.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public void addColoring(final String keyword, final String coloring) {
3737
id = Token.FUNCTION1 + num;
3838
paren = true;
3939
break;
40+
default:
41+
break;
4042
}
4143
keywords.add(keyword, (byte) id);
4244
}
@@ -157,7 +159,8 @@ public byte markTokensImpl(byte token, final Segment line, final int lineIndex)
157159
break;
158160
case Token.NULL:
159161
doKeyword(line, length, '\0');
160-
//$FALL-THROUGH$
162+
addToken(length - lastOffset, token);
163+
break;
161164
default:
162165
addToken(length - lastOffset, token);
163166
break;

0 commit comments

Comments
 (0)