Author of an issue is set incorrectly in many cases

(OfNoInterest) #1

There are so many issue where the automatically set author is incorrect. Is there a way to fix this issue? Are there any plans to fix this bug?

For example every issue which is about a duplicated string literal has almost every time a wrong author. Same thing for a method parameter which isn’t used any more. There are many more cases in which it makes absolutely no sense to set the author to the person who commited the line.

So when will this important mechanic be finally fixed?

(G Ann Campbell) #2


What heuristic do you recommend to know when not to set the author to the last committer on the issue line?


(OfNoInterest) #4

That depends entirely on the rule. For example if there are 2 duplicate strings in a class and the users adds the same string a third time, then this last commit should be used as the author and not the line of the first declaration of the string.

If you remove all usages of a method parameter and forget to remove it from the method signature then the author should be the one who removed it from the method body.

(G Ann Campbell) #5


For the 2 duplicate strings case, it should be fixed from version 7.4: 1. SONAR-9904

For the deletion case, figuring out that something is unused not because it was stubbed in and then never called, but because a different line (which line? where?) was edited or deleted would mean examining every line of the file and comparing the current version to the previous version which, frankly just doesn’t seem worth the effort for something like an unused parameter.