首页 > 解决方案 > 如何使 PMD 不计算带有括号的行作为代码行?

问题描述

如何使 PMD 不计算仅包含大括号的行?例如:

public static void countMyLines() {
   int a = 1;
   int b = 2;
   System.out.println("result: "+(a+b));
} // don't count this line

我正在使用 CLI 检查我的项目。

标签: command-line-interfacepmd

解决方案


推荐阅读