Java项目未使用参数检查工具推荐(CheckStyle 3.7环境)
寻找CheckStyle 3.7可用的未使用参数检查工具
早期的CheckStyle版本曾提供UnusedParameterCheck功能,我目前使用CheckStyle 3.7版本,不想降级到旧版本,希望找到能实现类似功能的未使用参数检查工具。
我的测试场景代码如下:
... main method .. test("hello"); return Longs.tryParse(request.getCategoryId()); } @Nullable Long test(String unused) { System.out.println("Hello World"); return null; }
需求是:当检测到未使用的方法参数时,触发构建失败。
内容的提问来源于stack exchange,提问作者SagwaCat
相关产品推荐
相关产品推荐

