inversionhourglass / Rougamo

Compile-time AOP component. Works with any method, whether it is async or sync, instance or static. Uses an aspectj-like pattern to match methods.
MIT License
393 stars 47 forks source link

引入Rougamo后,降低了整个项目的代码覆盖率,如何解决? #64

Closed Harper0712 closed 7 months ago

Harper0712 commented 7 months ago

情况是这样的:我将Rougamo(v1.4.1)引入到一个公共库上,并且将公共库中使用到Rougamo的类加上了ExcludeFromCodeCoverageAttribute;然后将公共库打包到nuget上,其他项目再引入公共库,从而使用公共库中的Rougamo的功能。

现在的问题是:引入公共库的项目在teamcity上build的时候发现Fody的Code Coverage为0,从而降低了整个项目的Code Coverage。所以请问有什么好的方法解决这个问题吗?

image
inversionhourglass commented 7 months ago

这个代码覆盖率还会检测第三方类库的吗,是否能指定排除Fody这个程序集,TeamCity没有用过

Harper0712 commented 7 months ago

我也很奇怪为什么会把Fody给扫出来,这个应该取决于构建工具的policy,目前只能先排除对Fody的覆盖率检查,但也只是临时方案,期待能有类似于ExcludeFromCodeCoverageAttribute这样的方式一劳永逸得解决这个问题。

inversionhourglass commented 7 months ago

这个我有时间研究一下,有好的解决方案也欢迎提出