Using git-forensics-plugin in multibranch pipeline. I am getting the following error:

[-ERROR-] Errors while obtaining repository statistics
[PHPStan] [-ERROR-] No statistics found for file ‘…/…/’

Jenkinsfile snippet:

stage (‘Git mining’) {
steps {
discoverGitReferenceBuild(defaultBranch: “main”)

I can’t figure out what I am doing wrong and google search brings up nothing useful.

This is a warning caused by PHPStan of the warnings plugin. It seems that the parser creates a warning for a file “…/…/”. This file obviously does not exist.

I stripped the name out of the post, but maybe something is off path wise in my jenkins file.

This has something to do with the parser resolving absolute paths. If you share the log that contains the warning I can help to see if the parser needs a fix.

You want which log? phpcs?

It seems that PHPStan reads an XML file with the CheckStyle parser. So we need the part of the XML file that contains issues for the file that has not been found by the forensics plugin. Your marked it with ‘…/…/’.

What exactly is the filename in the warning? What is the absolute filename? You can anonymize the names (but not with …, use words).

Actually you helped me solve it. I went and used full paths and not relative paths and it worked perfect!