We are unable to collect blame data information for the few files in the .NET application build.
Although we have enabled blame information global settings in the Sonar.
We are unable to collect blame data for few files developed in the .NET application. This is observed only for single project(solution) where only 4 files are affected (files checked-in almost a yr back). Other files does show valid author and valid creation date check-in history but these 4 files appear in latest Creation Date filter with warning as “Missing blame information for 4 files. This may lead to some features not working correctly.” and missing author name.
For other project it works fine just an issue with one of the project among 10 other projects. Please help us to get this rectified.
jenkinsCI_log.txt (6.1 MB)
Hi Ann,
I have attached Jenkins CI log file and we aren’t modifying the files which has issue with blame information as we aren’t doing any changes at runtime.
I’m from Prakash team, Replying on his behalf. Git blame does provide that information but how to make it work from CI CD (build tool), can you please help us out? I get " Missing blame information for 4 files. This may lead to some features not working correctly. Please check the analysis logs and refer to the documentation." in warning on that project. please help.
According to me it is not, is there a way to identify it? When we go to bitbucket and check history for the file it shows 2021 dec. not sure why does it appear in latest search window and also shows as missing blame.
We got below details in Jenkins CI job where four files have missing blame information.
Requesting you to help to get this resolve.
16:28:50 WARN: Missing blame information for the following files:
16:28:50 WARN: * XXXXX/XXXX/XXXXXX/AT_Hanger_MEDICARE_DME_Redetemination_Request_Form.cshtml
16:28:50 WARN: * XXXXX/XXXX/XXXXXX/AT_CMM_AmeriHealth_Claims_Determination.cshtml
16:28:50 WARN: * XXXXX/XXXX/EcsStatusCodeHelp.html
16:28:50 WARN: * XXXXX/XXXX/XXXXXXX/AT_CMM_Humana_GRIEVANCE_APPEAL_REQUEST_FORM.cshtml
16:28:50 WARN: This may lead to missing/broken features in SonarQube
We have tried your suggestion but still unable to resolve the issue.
We have tried several ways and found JGit commands has proper blame information but we aren’t able to find how to integrate same with Jenkins CI or in Sonar.
Command we are using : /home/sonarqube/jgit.sh blame
MyRepository/Views/MyViewDirectory/MyViewName.cshtml
Hello,
JGit won’t fail if some lines don’t have a blame info but it will show no commit sha1 or author for those lines. When that happens, SonarQube refuses to collect any blame information for the file.