Xiaoven / codegex

A light-weight tools like spotbugs
GNU Lesser General Public License v2.1
1 stars 0 forks source link

FPs for SA_SELF_ASSIGNMENT #131

Closed Xiaoven closed 3 years ago

Xiaoven commented 3 years ago

也可以说是 parser 的问题,因为 parser 没有考虑到 hunk 所有的行从头到尾都是注释的情况

// https://github.com/checkstyle/checkstyle/pull/9246/files#diff-9bedac2996d0bc061df6fd8e1d2e6486e6009c22fd97ecaa0f2d81fca5e6cda5R91
@@ -89,53 +89,144 @@
 * <pre>
 * &lt;module name=&quot;RequireThis&quot;/&gt;
 * </pre>
 * <p>Example:</p>
  * <pre>
 * public class Test {
 *     // overlapping by method argument
 *     c = c;            // violation, reference to instance variable "c" requires "this"
Xiaoven commented 3 years ago

加个变量判断是否所有行都是 * 开头,如果是,则整个当作注释?

Xiaoven commented 3 years ago
// https://github.com/JSQLParser/JSqlParser/pull/1104/files#diff-71bc60fb5c980f2812f91adb799c487240a4d76cb2a8292da2c8063c22f2571cR82
values.get(idx).name = name;
values.get(idx).expressions = expressions;
Xiaoven commented 3 years ago
// https://github.com/GervinFung/SimpleParallelChessAI/pull/1/files/a498f415707d05b2eff04b8c756d8ed1ee58227b#diff-e2f1d94d82188eae8401d034e3885f4c5f5c20598cbacacec22a691c5af4879a
this.getGameSetup().whitePlayer = whitePlayer;