aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-10-03 16:35:23 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2014-10-03 16:35:56 +0200
commit66db6f87003bd506d3b5b85a67b68029f84bb28a (patch)
treeaee6b305b3f2422e8fe907eaf96e7751acaa445a /plugins
parent1f1399a327dd79619ec950ebdd8474a35fde0866 (diff)
downloadsonarqube-66db6f87003bd506d3b5b85a67b68029f84bb28a.tar.gz
sonarqube-66db6f87003bd506d3b5b85a67b68029f84bb28a.zip
SONAR-5620 Fix missing line with Git
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-git-plugin/src/main/java/org/sonar/plugins/scm/git/JGitBlameCommand.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/sonar-git-plugin/src/main/java/org/sonar/plugins/scm/git/JGitBlameCommand.java b/plugins/sonar-git-plugin/src/main/java/org/sonar/plugins/scm/git/JGitBlameCommand.java
index 1c586c142ff..0e4b43d67bc 100644
--- a/plugins/sonar-git-plugin/src/main/java/org/sonar/plugins/scm/git/JGitBlameCommand.java
+++ b/plugins/sonar-git-plugin/src/main/java/org/sonar/plugins/scm/git/JGitBlameCommand.java
@@ -55,6 +55,10 @@ public class JGitBlameCommand implements BlameCommand, BatchComponent {
blameResult.getSourceAuthor(i).getEmailAddress(),
blameResult.getSourceCommitter(i).getEmailAddress()));
}
+ if (lines.size() == inputFile.lines() - 1) {
+ // SONARPLUGINS-3097 Git do not report blame on last empty line
+ lines.add(lines.get(lines.size() - 1));
+ }
result.add(inputFile, lines);
}
} catch (IOException e) {