Specify the base build for comparing the result against.
While working with git scm, if PULL_REQUEST_TO_HASH environment variable is defined, compare the CPPCheckResults with the build which built that base as opposed to the immediately preceding one.
https://issues.jenkins-ci.org/browse/JENKINS-24076
:+1: Something like this sounds like a very useful feature. I'm also using a Jenkins job to check Pull Requests, and traditional CI behaviour of comparing results with a previous build (even if it's a stable build) doesn't apply, as each PR is separate branch that may or may not be merged into upstream tracking branch.
Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests.