psycofdj / coverxygen

Generate doxygen's documentation coverage report
GNU General Public License v3.0
49 stars 11 forks source link

Difficulties in getting started #30

Open maehw opened 1 year ago

maehw commented 1 year ago

Hi all!

Thanks to the doxy-coverage and coverxygen project members for all the time & effort that has been put into the projects.

I am currently evaluating the use of coverxygen - working with a C/C++ code base.

I hade some starting difficulties, so I am currently playing around with a reduced code sample. It basically seems to work.

My flow:

# change directory to coverxygen repository, then generate Doxygen documentation from my example in ./test/average
$ cd ./test/average/ && doxygen && cd ../..

# run coverxygen
$ python3 -m coverxygen --xml-dir ./test/average/doc/xml/ --output ./test/average/doc/average.info --output ./test/average/doc/coverage.info --src-dir ./test/average/

# output lcov
$ lcov --summary ./test/average/doc/coverage.info
Reading tracefile ./test/average/doc/coverage.info
Summary coverage rate:
  lines......: 60.0% (3 of 5 lines)
  functions..: no data found
  branches...: no data found

# generate HTML report and view it in the browser
$ genhtml --no-function-coverage --no-branch-coverage ./test/average/doc/coverage.info -o ./test/average/doc/coverage
Reading data file ./test/average/doc/coverage.info
Found 2 entries.
Found common filename prefix "/mnt/somepath/coverxygen/test"
Writing .css and .png files.
Generating output.
Processing file average/average.cpp
Processing file average/doc/xml/todo.xml
Writing directory view page.
Overall coverage rate:
  lines......: 60.0% (3 of 5 lines)

Undocumented functions are detected as expected.

Before:

LcovTest

After:

LcovTest2


Where (if at all) can I exclude the check for #includes, usings and probably other keywords/expressions/statements?

Your README.md shows the following example:

summary Format

Classes    :  90.5% (38/42)
Defines    :   0.0% (0/2)
Enum Values:  12.3% (8/65)
Enums      :  75.0% (3/4)
Files      :   8.3% (2/24)
Functions  :  64.8% (175/270)
Namespaces :  75.0% (6/8)
Pages      : 100.0% (7/7)
Signals    :  83.3% (5/6)
Slots      :  28.6% (2/7)
Structs    :  80.0% (4/5)
Typedefs   :  39.1% (9/23)
Variables  :  20.0% (8/40)
-----------------------------------
Total      :  53.1% (267/503)

What needs to be done to get this detailed summary?

Can you also check if all parameters of a function/method have been commented?

Any help is very much appreciated.

j-ulrich commented 1 year ago

Where (if at all) can I exclude the check for #includes, usings and probably other keywords/expressions/statements?

It should not mark those lines. It should only mark the constructs which are also listed in the summary table (classes, defines etc.). I don't really understand what's going on there. Maybe you can check the .xml files generated by Doxygen and check if you find those two lines mentioned in of the .xml files. This might then give an insight what is going on.

What needs to be done to get this detailed summary?

You need to run coverxygen with the --format summary parameter.

Can you also check if all parameters of a function/method have been commented?

Not yet. See #29