modified to skip error lines
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1020 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -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
|
||||
|
@ -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=<FILE>;
|
||||
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() {
|
||||
|
Reference in New Issue
Block a user