Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting lines of C code in files

We are using gcov and gcovr.py to get coverage reports for our tests. Not all the source files are tested at all and therefore those aren't mentioned in gcovr report. Now I'd like to calculate overall coverage for whole code base nevertheless.

From the reports I can get lines covered but I'd also need to get number of C code lines in those files which aren't tested. What would be the possibilities to to get lines of C code in files inside code directory?

like image 406
burm Avatar asked Oct 23 '25 16:10

burm


1 Answers

Have a look at cloc, which will count lines of code in files or process a directory: https://github.com/AlDanial/cloc.

like image 161
scooter me fecit Avatar answered Oct 27 '25 03:10

scooter me fecit



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!