pavel-kirienko / o1heap

Constant-complexity deterministic memory allocator (heap) for hard real-time high-integrity embedded systems. There is very little activity because the project is finished and does not require further changes.
MIT License
253 stars 29 forks source link

Coverage metrics reported by SonarCloud are incorrect #9

Closed pavel-kirienko closed 3 years ago

pavel-kirienko commented 3 years ago

SonarCloud reports coverage at 72.8%, while the actual value is 100%. I suspect this might be caused by the assertion macros --- each contains a conditional with two branches, of which one (the failure case) is never executed. We should find a way to exclude assertion checks from coverage analysis; perhaps we could set NDEBUG or build in RelWithDebInfo mode (although I'm worried that the latter may render coverage data less accurate due to optimization).

https://sonarcloud.io/component_measures?id=pavel-kirienko_o1heap&metric=coverage&selected=pavel-kirienko_o1heap%3Ao1heap%2Fo1heap.c&view=list