Not "ignore lombok annotations", but methods annotated with @lombok.Generated, or even more precise quoting entry from 0.8.3 changelog:是的,这是预期的.在类的检测(插入探针)期间不会进行方法的过滤. exec文件不是最终报告,它包含有关插入到类中的所有探针的原始信息.方法的过滤发生在生成报告(分析exec和class文件)的过程中,即在执行 report JaCoCo Ant Task .Yes, this is expected. Filtering of methods doesn't happen during instrumentation of classes (insertion of probes). exec file is not final report, it contains raw information about all probes inserted in class. Filtering of methods happens during generation of report (analysis of exec and class files), i.e. during execution of report JaCoCo Ant Task for example. SonarQube 将JaCoCo嵌入为库和使用它来分析exec和类文件以生成其报告.SonarQube embeds JaCoCo as a library and use it to analyze exec and class files for generation of their report.这就是JaCoCo发布公告通常包含以下声明的原因,例如对于 0.8.2 :And that's why JaCoCo release announcements usually contain following statement, e.g. for 0.8.2:我们作为JaCoCo项目的一部分开发的集成的 0.8.2版本(Ant Tasks,Maven插件和命令行界面)提供Java 11支持和新的过滤器,0.8.2 version of integrations developed as part of JaCoCo project by us (Ant Tasks, Maven Plugin and Command Line Interface) provide Java 11 support and new filters,工具将提供分析Java 11类文件并仅在它们更新到此版本的JaCoCo后使用新过滤器的功能. . 因此,请关注/等待/等各个供应商,例如tools that directly read exec files (which is not a final report) and embed JaCoCo as a library for generation of report will provide ability to analyze Java 11 class files and to use new filters only after they updated to this version of JaCoCo. So please follow/wait/etc respective vendors such as SonarQube- https://jira.sonarsource.com/browse/SONARJAVA-2876,或尝试使用读取XML报告的新插件- https://github.com/SonarSource/声纳雅各布SonarQube - https://jira.sonarsource.com/browse/SONARJAVA-2876 , or try to use new plugin that reads XML report - https://github.com/SonarSource/sonar-jacoco 这篇关于JaCoCo忽略了Lombok代码,这是预期的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-24 13:04