diff --git a/pmd-web/src/pmd.rb b/pmd-web/src/pmd.rb index 30c447f78c..32548d4167 100644 --- a/pmd-web/src/pmd.rb +++ b/pmd-web/src/pmd.rb @@ -45,6 +45,10 @@ class Job } t.join end + + def checkOutOK + return File.exists?(@sourceDirectory) + end def run_pmd cmd="java -jar pmd-1.03.jar \"#{@sourceDirectory}\" html rulesets/unusedcode.xml > \"#{reportFile()}\"" diff --git a/pmd-web/src/processor.rb b/pmd-web/src/processor.rb index 55760f7b29..c34e0d3b0c 100644 --- a/pmd-web/src/processor.rb +++ b/pmd-web/src/processor.rb @@ -17,8 +17,10 @@ jobsDir.each { |candidate| #puts "Processing #{job}" job.clear job.checkout_code - job.run_pmd - job.clear + if (job.checkOutOK) + job.run_pmd + job.clear + end end rescue puts "Exiting with error: #{$!}" diff --git a/pmd-web/src/webpmd.pl b/pmd-web/src/webpmd.pl index f7059916ba..295f7a9fa8 100644 --- a/pmd-web/src/webpmd.pl +++ b/pmd-web/src/webpmd.pl @@ -27,7 +27,7 @@ sub default() { my $lastruntime=; close(FILE); print br(); - print "The last run finished at ", $lastruntime; + print "This report is run 10 minutes past the hour at midnight, 3, 6, 9, 12, 15, 18, and 21 hours. The last run finished at ", $lastruntime; print hr(); if (param("unixname")) {