I am working on the PMD tool/sensor integration to Hackystat this morning to fix the
dependency upon PMD tool installation. (I was the one who told Julie to write it this
way, so this is my bad.) More details on this update later in the day.
However. I came across the following code in pmd.build.xml:
<!-- Check if pmd sensor is installed in Ant and enabled. -->
<condition property="pmd.sensor.available">
<and>
<available classname="org.hackystat.sensor.pmd.PmdSensor" />
<!-- Uncomment 'pmd.sensor.enabled=true' in hackystat.build.properties to enable.
-->
<isset property="pmd.sensor.enabled" />
</and>
</condition>
No matter how many times I try to delete this kind of code from the build system, it
keeps popping up again! (I feel like I'm playing "Whack-A-Mole").
Folks: please do not write build code that replicates the information already specified
in the sensor.properties file. In particular:
<isset property="pmd.sensor.enabled" />
This is redundant and adds complexity. The situation is really very simple: The PMD
sensor should run if you have enabled it in your sensor.properties file. It should not
run if you have not enabled it in your sensor.properties file. (Long ago, in a version
of Hackystat far, far, away, such code was needed for the daily build system. But now the
daily build system swaps in different sensor.properties files depending upon the
configuration it is building, so such code is no longer necessary.)
If you find such code in the build system, please either delete it or tell me about it so
I can delete it. Whatever you do, don't replicate it!
Yours for simpler build systems,
Philip