BUILDR-672 - Persist the properties field in the checkstyle addon so that they can...
authorPeter Donald <donaldp@apache.org>
Sat, 10 Aug 2013 06:06:45 +0000 (06:06 +0000)
committerPeter Donald <donaldp@apache.org>
Sat, 10 Aug 2013 06:06:45 +0000 (06:06 +0000)
Submitted by Wim C.

git-svn-id: https://svn.apache.org/repos/asf/buildr/trunk@1512570 13f79535-47bb-0310-9956-ffa450edef68

CHANGELOG
addon/buildr/checkstyle.rb

index 9710a07..4c78980 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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;
index 7127b71..5b688a7 100644 (file)
@@ -130,10 +130,12 @@ module Buildr
       end\r
 \r
       def properties\r
-        properties = {:basedir => self.project.base_dir}\r
-        properties['checkstyle.suppressions.file'] = self.suppressions_file if File.exist?(self.suppressions_file)\r
-        properties['checkstyle.import-control.file'] = self.import_control_file if File.exist?(self.import_control_file)\r
-        properties\r
+        unless @properties\r
+          @properties = {:basedir => self.project.base_dir}\r
+          @properties['checkstyle.suppressions.file'] = self.suppressions_file if File.exist?(self.suppressions_file)\r
+          @properties['checkstyle.import-control.file'] = self.import_control_file if File.exist?(self.import_control_file)\r
+        end\r
+        @properties\r
       end\r
 \r
       def source_paths\r