perforce / sonar-scm-perforce

SonarQube Perforce plugin
6 stars 23 forks source link

Uses only filename to resolve files in P4 #23

Open rahouskiids opened 4 years ago

rahouskiids commented 4 years ago

Getting a lot of P4 errors using this plugin with SQ 7.9.1

MultiAccountProxyModule.java#have - file(s) not on client.
PersonnelInfoVO.groovy#have - file(s) not on client.
DealerPayableEditException.groovy#have - file(s) not on client.
HolidayWeekendFormService.groovy#have - file(s) not on client.
GetInvoiceFormatPOFloatingRateCall.groovy#have - file(s) not on client.
UpdateNoteFloatDefaultsCall.groovy#have - file(s) not on client.

It appears that the plugin uses only file name in the line below. For what it's worth changing to using inputFile.absolutePath() fixes the problem.

https://github.com/perforce/sonar-scm-perforce/blob/f0be2ebc670fe10a7acce8dcd7ce5199ece83bf4/src/main/java/org/sonar/plugins/scm/perforce/PerforceBlameCommand.java#L214

gaspardpetit commented 2 years ago

Duplicate of https://github.com/perforce/sonar-scm-perforce/issues/21 I believe