Qafoo GmbH - passion for software quality
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Author: Kore Nordmann
:Date: Wed, 20 Nov 2013 09:20:39 +0100
:Revision: 10
:Copyright: All rights reserved
================================
Tracking Changes in PHP Projects
================================
:Description:
Since quite some time I've talked to people about the idea for a tool that
tracks changes in the classes and methods of your PHP project in order to
detect which entities are changed most frequently, which are often affected
bugs and other statistics. After some hacking, we are now making it
available on Github.
:Keywords:
PHP, static code analysis, code churn, analyze changes, git
:Abstract:
Since quite some time I've talked to people about the idea for a tool that
tracks changes in the classes and methods of your PHP project in order to
detect which entities are changed most frequently, which are often affected
bugs and other statistics. After some hacking, we are now making it
`available on Github`__.
__ https://github.com/Qafoo/changetrack
Since quite some time I've talked to people about the idea for a tool that
tracks changes in the classes and methods of your PHP project in order to
detect which entities are changed most frequently, which are often affected
bugs and other statistics. After some hacking, we are now making it `available
on Github`__.
__ https://github.com/Qafoo/changetrack
The `Qafoo ChangeTrack tool`__ consists of multiple commands that are based on
each other to analyzes the source code history of your PHP project. First of,
there is the ``analyze`` command, that produces an XML document of the source
code history, showning which commit affected which method and how many changes
were performed. For illustration, here is an extract of the analysis result for
the `Twig project`__::
15
3
__ https://github.com/Qafoo/changetrack
__ https://github.com/fabpot/Twig
The second command that is currently implemented is ``calculate``. This one
works on basis of the XML generated by ``analyze`` and calculates how often a
certain method was affected by a change of a certain type (e.g. *bug* or
*feature*).
.. note::
Qafoo experts can `support your team`__ to use the variety available of
static code analysis tools efficiently in your everyday work.
__ /services/consulting.html
To detect if a revision was created in order to fix a bug or to implement a
feature, you can currently use regular expressions against the commit message
or connect Github issue labels. It should be easy to extends this feature to
check for issue references on Jira, etc.
The following example shows an extract of the stats gegerated for Twig on basis
of the default label provider configuration::
17
1
Note, that the software is still pre-alpha and has only been tested
against a few repositories, yet. Also, the ``analyze`` command is really slow
at the moment, since I did not pay much attention to performance, yet. For
example, on my X220 it takes roughly 40 minutes to analyze the Twig project
history.
I would love you to try out the tool, `report any bugs`__ you find on Github
and to discuss fancy ideas you might have around the generated data and what
can be achieved on that basis.
__ https://github.com/Qafoo/changetrack/issues
(This tool is, among others, inspired by the `bugminer`__ script from Sebastian
Bergmann.)
__ https://github.com/sebastianbergmann/bugminer
..
Local Variables:
mode: rst
fill-column: 79
End:
vim: et syn=rst tw=79
Trackbacks
==========
Comments
========