Update checkstyle addon to supply checkstyle.config.dir property.

Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/c4bd7918
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/c4bd7918
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/c4bd7918

Branch: refs/heads/master
Commit: c4bd7918d5ee049dfe50d43993be4f4fb2a76c2a
Parents: 444c978
Author: Peter Donald <[email protected]>
Authored: Mon Sep 22 19:14:37 2014 +1000
Committer: Peter Donald <[email protected]>
Committed: Mon Sep 22 19:14:37 2014 +1000

----------------------------------------------------------------------
 CHANGELOG                  | 1 +
 addon/buildr/checkstyle.rb | 1 +
 2 files changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/c4bd7918/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index a4d5894..bfac3fb 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,5 @@
 1.4.21 (Pending)
+* Added:  Update checkstyle addon to supply checkstyle.config.dir property.
 * Added:  Update pmd addon to support downloading rule files as an artifact.
 * Change: Update pmd addon to use pmd version 5.1.3.
 * Fixed:  BUILDR-702 - Retain Unix permission flags when merging

http://git-wip-us.apache.org/repos/asf/buildr/blob/c4bd7918/addon/buildr/checkstyle.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/checkstyle.rb b/addon/buildr/checkstyle.rb
index 3cf3cd3..2215c50 100644
--- a/addon/buildr/checkstyle.rb
+++ b/addon/buildr/checkstyle.rb
@@ -142,6 +142,7 @@ module Buildr
       def properties
         unless @properties
           @properties = {:basedir => self.project.base_dir}
+          @properties['checkstyle.config.dir'] = self.config_directory if 
File.directory?(self.config_directory)
           @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

Reply via email to