Why is a closing brace showing no code coverage?

前端 未结 2 1091
慢半拍i
慢半拍i 2021-02-07 22:53

I\'ve got a Swift function for which Xcode is showing 0 passes in code coverage. The line is a closing brace (highlighted in red below).

Is this a bug in Xcode? If not,

2条回答
  •  花落未央
    2021-02-07 23:11

    xcode reports include measurements for ending brackets, which is not typically desired. There is nothing you can do in configuration to fix this (as far as I know).

    (FD I work at Codecov) You can use Codecov, a hosted solution, that will remove these extra lines automatically. Learn more at https://github.com/codecov/example-xcode. Thanks :)

提交回复
热议问题