Closed rohitstv1990 closed 7 years ago
Hi,
Can you describe a bit more the problem please? How can we reproduce it?
Thanks for the description. I reviewed your code and can you apply some changes please?
System.out.println("Bad input: " + bad_input);
-> use the logger insteadString bad_input = e.getMessage();
-> Can you rename the variable to match the java code convention please?I will accept the PR after these changes.
Regards,
Geoffrey
Hi Geoffrey Thanks for the comments ,As suggested by you i have made the required changes please go through it and accept the same.
Regards Rohit
Done
Thanks a lot !!
Hi Geoffrey Thanks for accepting the pull request. Currently we are using sonarqube LTS 5.6.6, is it possible to have this fix updated in sonarqube update center UI?
Regards Rohit
Hi,
I will try to do a new version ASAP.
Regards,
Geoffrey
Hi Geoffrey We are facing this issue only with the functional code coverage. This scenario happens very frequently in case of functional code coverage If there is a difference in the line numbers in the coverage(xml) and the original file then the analysis is failing with the following exception : Error during Sonar runner execution org.sonar.runner.impl.RunnerException: Unable to execute Sonar at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91) at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75) at java.security.AccessController.doPrivileged(Native Method) at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102) at org.sonar.runner.api.Runner.execute(Runner.java:100) at org.sonar.runner.Main.executeTask(Main.java:70) at org.sonar.runner.Main.execute(Main.java:59) at org.sonar.runner.Main.main(Main.java:53) Caused by: java.lang.IllegalStateException: Can't create measure for line 173 for file '/jenkins/workspace/Coverage/FunctionalCodeCoverage/ConsolidatedFunctionalCodeCoverage/src/com/in/co/csp/cso/ims/reports/action/IMSReportsGeneralTabAction.java' with 169 lines
We think sonar analysis should not fail in case of functional code coverage even if there are some mismatch of line numbers for some file.