Missing Blame Info: Ignoring blame result since provider returned 10 blame lines but file ... has 20 lines

SonarQube 8.9.6
Azure DevOpsServer 2020 Update 1.1

We have Messages like “Ignoring blame result since provider returned 10 blame lines but file …Test.sql has 20 lines” for some Files in the Code Analysis Logs

What does this mean?
How can I fix this?

THX

Hi @ArminPrieschl,

I’d guess that you have uncommitted changes in that file. The scanner isn’t able to collect data from the SCM if the lines are not all seen in the SCM.

Hi @dmeneses ,

No there are no uncommitted changes. The Files are directly checktout from the GIT Repo in de Azure DevOps Pipeline.

Does the file actually have 10 or 20 lines, as shown by git? The scanner just counts the number of line feeds (\n) and carriage returns (\r) and we have not seen any discrepancy with this strategy.

THX
This was the correct hint.
The file had the line breaks with \r\n and some lines only with \r.
Changed all to \r\n and the blame error is gone away.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.