@@ -102,7 +102,7 @@ def generate_pmd_report(project)
102102 "-r #{ project . get_pmd_report_path ( @pmd_branch_name ) } " \
103103 "#{ fail_on_violation } -t #{ @threads } " \
104104 "#{ auxclasspath_option } " \
105- "#{ pmd7? ? ' --no-progress' : '' } "
105+ "#{ ' --no-progress' if pmd7? } "
106106 start_time = Time . now
107107 exit_code = nil
108108 if File . exist? ( project . get_pmd_report_path ( @pmd_branch_name ) )
@@ -173,7 +173,7 @@ def checkout_build_branch
173173 # determine the version
174174 @pmd_version = determine_pmd_version
175175
176- return unless wd_has_dirty_git_changes
176+ return unless wd_has_dirty_git_changes?
177177
178178 # working dir is dirty....
179179 # we don't allow this because we need the SHA to address the zip file
@@ -193,7 +193,7 @@ def saved_distro_path(build_sha)
193193 "-#{ build_sha } "
194194 end
195195
196- def wd_has_dirty_git_changes
196+ def wd_has_dirty_git_changes?
197197 !Cmd . execute_successfully ( 'git status --porcelain' ) . empty?
198198 end
199199
@@ -251,24 +251,24 @@ def find_pmd_dist_target
251251 def build_pmd_with_maven
252252 logger . info "#{ @pmd_branch_name } : Building PMD #{ @pmd_version } ..."
253253
254- if Semver . compare ( @pmd_version , '7.14.0' ) >= 0
255- # build command since PMD migrated to central portal
256- package_cmd = './mvnw clean package ' \
257- '-PfastSkip ' \
258- '-DskipTests ' \
259- '-T1C -B'
260- else
261- # build command for older PMD versions
262- package_cmd = './mvnw clean package ' \
263- "-s #{ ResourceLocator . resource ( 'maven-settings.xml' ) } " \
264- '-Pfor-dokka-maven-plugin ' \
265- '-Dmaven.test.skip=true ' \
266- '-Dmaven.javadoc.skip=true ' \
267- '-Dmaven.source.skip=true ' \
268- '-Dcheckstyle.skip=true ' \
269- '-Dpmd.skip=true ' \
270- '-T1C -B'
271- end
254+ package_cmd = if Semver . compare ( @pmd_version , '7.14.0' ) >= 0
255+ # build command since PMD migrated to central portal
256+ './mvnw clean package ' \
257+ '-PfastSkip ' \
258+ '-DskipTests ' \
259+ '-T1C -B'
260+ else
261+ # build command for older PMD versions
262+ './mvnw clean package ' \
263+ "-s #{ ResourceLocator . resource ( 'maven-settings.xml' ) } " \
264+ '-Pfor-dokka-maven-plugin ' \
265+ '-Dmaven.test.skip=true ' \
266+ '-Dmaven.javadoc.skip=true ' \
267+ '-Dmaven.source.skip=true ' \
268+ '-Dcheckstyle.skip=true ' \
269+ '-Dpmd.skip=true ' \
270+ '-T1C -B'
271+ end
272272
273273 logger . debug "#{ @pmd_branch_name } : maven command: #{ package_cmd } "
274274 Cmd . execute_successfully ( package_cmd )
0 commit comments