You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2013/08/10 08:06:46 UTC

svn commit: r1512570 - in /buildr/trunk: CHANGELOG addon/buildr/checkstyle.rb

Author: donaldp
Date: Sat Aug 10 06:06:45 2013
New Revision: 1512570

URL: http://svn.apache.org/r1512570
Log:
BUILDR-672 - Persist the properties field in the checkstyle addon so that they can be modified by the user. 

Submitted by Wim C.

Modified:
    buildr/trunk/CHANGELOG
    buildr/trunk/addon/buildr/checkstyle.rb

Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=1512570&r1=1512569&r2=1512570&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Sat Aug 10 06:06:45 2013
@@ -1,4 +1,7 @@
 1.4.13 (Pending)
+* Added:  BUILDR-672 - Persist the properties field in the checkstyle
+          addon so that they can be modified by the user. Submitted
+          by Wim C.
 * Fixed:  Make the package_as_* methods public so that the methods are
           detected in Ruby >= 2.0.0 via the respond_to? method.
 * Change: Updated dependency versions;

Modified: buildr/trunk/addon/buildr/checkstyle.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/addon/buildr/checkstyle.rb?rev=1512570&r1=1512569&r2=1512570&view=diff
==============================================================================
--- buildr/trunk/addon/buildr/checkstyle.rb (original)
+++ buildr/trunk/addon/buildr/checkstyle.rb Sat Aug 10 06:06:45 2013
@@ -130,10 +130,12 @@ module Buildr
       end
 
       def properties
-        properties = {:basedir => self.project.base_dir}
-        properties['checkstyle.suppressions.file'] = self.suppressions_file if File.exist?(self.suppressions_file)
-        properties['checkstyle.import-control.file'] = self.import_control_file if File.exist?(self.import_control_file)
-        properties
+        unless @properties
+          @properties = {:basedir => self.project.base_dir}
+          @properties['checkstyle.suppressions.file'] = self.suppressions_file if File.exist?(self.suppressions_file)
+          @properties['checkstyle.import-control.file'] = self.import_control_file if File.exist?(self.import_control_file)
+        end
+        @properties
       end
 
       def source_paths