code format

https://github.com/alibaba/p3c/issues/107
This commit is contained in:
骏烈
2017-10-24 09:48:22 +08:00
parent 1ade912a4e
commit 40eaededd1
10 changed files with 253 additions and 253 deletions

View File

@@ -204,7 +204,7 @@ Positive example:
// please refer to the pseudo-code as follows
boolean existed = (file.open(fileName, "w") != null) && (...) || (...);
if (existed) {
...
//...
}
```
@@ -212,7 +212,7 @@ Positive example:
```java
if ((file.open(fileName, "w") != null) && (...) || (...)) {
...
// ...
}
```

View File

@@ -41,6 +41,7 @@ public class NodeUtils {
/**
* TODO optimize
*
* @param expression expression
* @return true if wrapper type
*/

View File

@@ -42,7 +42,7 @@
<![CDATA[
Positive example:
String KEY_PRE = "Id#taobao_1";
if(key.equals(KEY_PRE)){
if (KEY_PRE.equals(key)) {
//...
}
]]>

View File

@@ -49,7 +49,7 @@
<![CDATA[
Negative example:
if ((file.open(fileName, "w") != null) && (...) || (...)) {
...
// ...
}
]]>
</example>
@@ -58,7 +58,7 @@ Negative example:
Positive example:
boolean existed = (file.open(fileName, "w") != null) && (...) || (...);
if (existed) {
...
//...
}
]]>
</example>

View File

@@ -34,7 +34,7 @@
Integer a = 235;
Integer b = 235;
if (a.equals(b)) {
//相等
// code
}
]]>
</example>
@@ -112,7 +112,7 @@
<example>
<![CDATA[
反例:
Negative example:
String result;
for (String string : tagNameList) {
result = result + string;
@@ -121,7 +121,7 @@
</example>
<example>
<![CDATA[
正例:
Positive example:
StringBuilder stringBuilder = new StringBuilder();
for (String string : tagNameList) {
stringBuilder.append(string);

View File

@@ -104,7 +104,6 @@ Negative example:
if (delCondition) {
it.remove();
}
}
]]>
</example>