Closed ThE-TiGeR closed 6 years ago
Thanks for the contribution. Would it be possible to add a unit test ?
I have not done any unit tests with java until now, I also do not know how to run your unit tests
Unit test added to this new pull request : https://github.com/SonarSource/sonar-scm-mercurial/pull/11 Will be merged soon.
Meanwhile I close this PR. Thanks for the contribution.
INFO: java.lang.ArrayIndexOutOfBoundsException: -1 INFO: at java.util.ArrayList.elementData(Unknown Source) INFO: at java.util.ArrayList.get(Unknown Source) INFO: at org.sonar.plugins.scm.mercurial.MercurialBlameCommand.blame(MercurialBlameCommand.java:104) INFO: at org.sonar.plugins.scm.mercurial.MercurialBlameCommand.access$000(MercurialBlameCommand.java:42) INFO: at org.sonar.plugins.scm.mercurial.MercurialBlameCommand$1.call(MercurialBlameCommand.java:83) INFO: at org.sonar.plugins.scm.mercurial.MercurialBlameCommand$1.call(MercurialBlameCommand.java:80)
This happens if blame fails (e.g. file not under version control) and the source file has only one line of code