Generating coverage analysis
Generating coverage analysis data
-
Make sure you have a fresh checkout of
pear
andpeardoc
directories from cvs.php.net. -
Configure
peardoc
to generate themanual.xml
in there ( autoconf, ./configure). -
Call
genData.php
with the path to peardoc'smanual.xml
as first, and path to the pear cvs directory as second parameter. -
A file called
doc.dat
will be generated in the current working directory.
Generating HTML reports
Once the coverage data is generated and serialized, you can generate some HTML reports. For this, the packages provides four Renderer classes that all implement the QA_Peardoc_Coverage_Renderer interface:
-
QA_Peardoc_Coverage_Renderer_DeveloperList lists all developers with the number of packages they have, the number of undocumented packages and lists the undocumented ones. The list is sorted by percentage of documented packages.
-
QA_Peardoc_Coverage_Renderer_SimplePackageList lists all categories in PEAR, the packages in them and shows which of them have docs and which not. A final summary with the total number of existing and documented packages, and a percentage number is also given.
-
QA_Peardoc_Coverage_Renderer_ExtendetPackageList is similar to the simple list, but also shows the package's classes, their documentation state and their methods and their doc state. This list can be used to check which methods aren't yet covered by your documentation.
-
QA_Peardoc_Coverage_Renderer_MissingDocsPerDeveloper generates an array of developer email => array(package names) assignments that can be used as base data to send reminder emails.
All the renderers have a examples/gen*.php
file that
uses the doc.dat
file written by
examples/genData.php
. They echo the html to the console,
so you should redirect it into a file.