有没有一种方法可以强制Checkstyle忽略源代码中的特定警告? [英] Is there a way to force Checkstyle to ignore particular warning in the source code?
本文介绍了有没有一种方法可以强制Checkstyle忽略源代码中的特定警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
PMD通过Java源文件中的 // NOPMD
注释可以忽略特定警告。
PMD has a way to ignore particular warning with //NOPMD
comment inside Java source file.
可以Checkstyle有类似的选择吗?
Does Checkstyle have similar option?
推荐答案
是的,请查看 SuppressionCommentFilter 和 SuppressWithNearbyCommentFilter 选项。
这篇关于有没有一种方法可以强制Checkstyle忽略源代码中的特定警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文