diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2014-10-03 16:02:54 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2014-10-03 16:07:33 +0200 |
commit | 6a2bbb248a9a192249fe6e4df1ad4c9444f8f78e (patch) | |
tree | 4ff657079e069cf3b36c4fb81e069ac315f97ede /plugins | |
parent | 72e5ccaf03bb37e407ec0e0e4c7253f5060708da (diff) | |
download | sonarqube-6a2bbb248a9a192249fe6e4df1ad4c9444f8f78e.tar.gz sonarqube-6a2bbb248a9a192249fe6e4df1ad4c9444f8f78e.zip |
SONAR-5620 Minor fixes
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java | 8 | ||||
-rw-r--r-- | plugins/sonar-svn-plugin/src/main/java/org/sonar/plugins/scm/svn/SvnBlameCommand.java | 8 |
2 files changed, 11 insertions, 5 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java index 5caa64ee892..d899b20e496 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java @@ -256,10 +256,10 @@ import java.util.List; type = PropertyType.STRING, multiValues = true), @Property( - key = CoreProperties.SCM_ENABLED_KEY, - defaultValue = "true", - name = "Activation of the SCM Sensor", - description = "This property can be set to false in order to deactivate the SCM Sensor.", + key = CoreProperties.SCM_DISABLED_KEY, + defaultValue = "false", + name = "Disable the SCM Sensor", + description = "This property can be set to true in order to deactivate the SCM Sensor.", module = false, project = true, global = true, diff --git a/plugins/sonar-svn-plugin/src/main/java/org/sonar/plugins/scm/svn/SvnBlameCommand.java b/plugins/sonar-svn-plugin/src/main/java/org/sonar/plugins/scm/svn/SvnBlameCommand.java index 4a9f2ba0e27..fed32b126b1 100644 --- a/plugins/sonar-svn-plugin/src/main/java/org/sonar/plugins/scm/svn/SvnBlameCommand.java +++ b/plugins/sonar-svn-plugin/src/main/java/org/sonar/plugins/scm/svn/SvnBlameCommand.java @@ -26,6 +26,7 @@ import org.sonar.api.batch.InstantiationStrategy; import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.scm.BlameCommand; +import org.sonar.api.batch.scm.BlameLine; import org.sonar.api.utils.command.Command; import org.sonar.api.utils.command.CommandExecutor; import org.sonar.api.utils.command.StreamConsumer; @@ -89,7 +90,12 @@ public class SvnBlameCommand implements BlameCommand, BatchComponent { if (exitCode != 0) { throw new IllegalStateException("The svn blame command [" + cl.toString() + "] failed: " + stderr.getOutput()); } - result.add(inputFile, consumer.getLines()); + List<BlameLine> lines = consumer.getLines(); + if (lines.size() == inputFile.lines() - 1) { + // SONARPLUGINS-3097 SVN do not report blame on last empty line + lines.add(lines.get(lines.size() - 1)); + } + result.add(inputFile, lines); return null; } }); |