Migrating PHPMD to use XML report format and add a UI plugin to display warning information. See #305

This commit is contained in:
Dan Cryer 2014-04-25 11:28:27 +00:00
commit 66bfcea8ed
8 changed files with 184 additions and 14 deletions

View file

@ -93,4 +93,24 @@ class GithubBuild extends RemoteGitBuild
return 'https://github.com/' . $this->getProject()->getReference() . '.git';
}
}
public function getCommitMessage()
{
$rtn = $this->data['commit_message'];
$rtn = preg_replace('/\#([0-9]+)/', '<a target="_blank" href="https://github.com/' . $this->getProject()->getReference() . '/issues/$1">#$1</a>', $rtn);
$rtn = preg_replace('/\@([a-zA-Z0-9_]+)/', '<a target="_blank" href="https://github.com/$1">@$1</a>', $rtn);
return $rtn;
}
public function getFileLinkTemplate()
{
$link = 'https://github.com/' . $this->getProject()->getReference() . '/';
$link .= 'blob/' . $this->getBranch() . '/';
$link .= '{FILE}';
$link .= '#L{LINE}';
return $link;
}
}