diff --git a/pmd-web/src/pmd.rb b/pmd-web/src/pmd.rb index 6e8bbe5455..e2f09275d1 100644 --- a/pmd-web/src/pmd.rb +++ b/pmd-web/src/pmd.rb @@ -60,6 +60,14 @@ class Job def run_pmd cmd="java -jar pmd-1.0rc2.jar #{@sourceDirectory} html rulesets/unusedcode.xml > ../htdocs/reports/#{@unixName}_#{@moduleDirectory}.html" `#{cmd}` + arr = IO.readlines("../htdocs/reports/#{@unixName}_#{@moduleDirectory}.html") + newFile=File.open("../htdocs/reports/#{@unixName}_#{@moduleDirectory}.html", "w") + arr.each do | line | + if (line["Error while parsing"] == nil) + newFile << line + end + end + newFile.close end def clear diff --git a/pmd-web/src/webpmd.pl b/pmd-web/src/webpmd.pl index 4893c1e1f7..ec3d1ef0a2 100644 --- a/pmd-web/src/webpmd.pl +++ b/pmd-web/src/webpmd.pl @@ -48,16 +48,19 @@ sub default() { } sub printStats() { - # we're starting each build at 10 past the hour, so... - my $offset = 10; print hr(); - print b("Stats:"), br(), "There are ", ((60 + $offset) - localtime()->min) % 60, " minutes until the next run"; + print b("Stats:"), br(), "There are ", getTimeUntil(), " minutes until the next run"; open(FILE,"lastruntime.txt"); my $lastruntime=; print br(); - print "The last run took ${lastruntime} seconds"; + print "The last run took ", sprintf("%.0f", $lastruntime), " seconds"; print br(); - +} + +sub getTimeUntil() { + # we're starting each build at 10 past the hour, so... + my $offset = 10; + return ((60 + $offset) - localtime()->min) % 60; } sub loadProjectList() {