Author: donaldp
Date: Sun Oct 30 11:34:48 2011
New Revision: 1195147
URL: http://svn.apache.org/viewvc?rev=1195147&view=rev
Log:
Updated the PMD extension so that it is consistent with the javancss extension
wrt how it is enabled
Modified:
buildr/trunk/addon/buildr/pmd.rake
buildr/trunk/doc/more_stuff.textile
Modified: buildr/trunk/addon/buildr/pmd.rake
URL:
http://svn.apache.org/viewvc/buildr/trunk/addon/buildr/pmd.rake?rev=1195147&r1=1195146&r2=1195147&view=diff
==============================================================================
--- buildr/trunk/addon/buildr/pmd.rake (original)
+++ buildr/trunk/addon/buildr/pmd.rake Sun Oct 30 11:34:48 2011
@@ -72,9 +72,7 @@ module Buildr
class Config
- def enable
- @enabled = true
- end
+ attr_writer :enabled
def enabled?
!!@enabled
Modified: buildr/trunk/doc/more_stuff.textile
URL:
http://svn.apache.org/viewvc/buildr/trunk/doc/more_stuff.textile?rev=1195147&r1=1195146&r2=1195147&view=diff
==============================================================================
--- buildr/trunk/doc/more_stuff.textile (original)
+++ buildr/trunk/doc/more_stuff.textile Sun Oct 30 11:34:48 2011
@@ -869,7 +869,7 @@ define "foo" do
define "bar" do ... end
- pmd.enable
+ pmd.enabled = true
pmd.rule_set_paths = _('etc/pmd') + "/"
pmd.source_paths << project('bar')._(:source, :main, :java)
pmd.rule_set_files =
['basic','imports','unusedcode','logging-java','finalizers']
@@ -877,7 +877,7 @@ define "foo" do
end
{% endhighlight %}
-The "pmd:rule:xml" task will be defined if the "pmd.enable" method is invoked.
+The "pmd:rule:xml" task will be defined if the "pmd.enabled" property is set
to true.
The extension will include the source and test directories of the project when
invoking the pmd tool. These can be added to by the parameters
"pmd.source_paths".