1

Any change in a class ( legacy code ) is considered as a new code in class level and sonar is showing less coverage even though if I have covered unit test case for a newly added method . Any way or configuration to tweak sonar dashboard to show method level coverage for new code..!!

G. Ann - SonarSource Team
  • 20,814
  • 3
  • 32
  • 60
vijay
  • 11
  • 1
  • You're saying that you modify a line that _is_ covered by unit tests, but it's showing up as uncovered new code? – G. Ann - SonarSource Team Jul 28 '16 at 11:26
  • No..for example if I write a new method in a legacy class which already contains 2000 lines and I have wrote the junit for the new method . Problem is Jacoco plugin shows method level coverage but sonar new feature "coverage for new code" considers 2000 lines as new code for coverage ... This leads to unable to complete the coverage for entire legacy code . – vijay Jul 29 '16 at 04:45
  • Any idea ?? Update ?? @SonarSource Team – vijay Jul 30 '16 at 18:57

0 Answers0