我正在将 findbugs 集成到一个混合的 java/kotlin 项目中。但是,由于 findbugs 作用于生成的 jar,它会查找与通过 kotlin 文件生成的类相关的错误。
有什么办法可以避免检查这些类吗?
谢谢
最佳答案
基于 <Source>
的过滤器过滤器类型。
This element matches warnings associated with a particular source file. The name attribute is used to specify the exact or regex match pattern for the source file name.
<FindBugsFilter>
<Match>
<Source name="~.*\.kt"/>
</Match>
</FindBugsFilter>
见:documentation for FindBugs filters 和 name matching details
关于findbugs - 如何使用 Findbugs 避免 kotlin 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35461310/