]> source.dussan.org Git - sonarqube.git/commitdiff
Fix some quality flaws
authorJulien HENRY <julien.henry@sonarsource.com>
Tue, 7 Oct 2014 15:25:54 +0000 (17:25 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Tue, 7 Oct 2014 15:52:32 +0000 (17:52 +0200)
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/measurefilters/package-info.java [new file with mode: 0644]
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/package-info.java [new file with mode: 0644]
plugins/sonar-svn-plugin/src/main/java/org/sonar/plugins/scm/svn/SvnBlameCommand.java
sonar-batch/src/main/java/org/sonar/batch/symbol/package-info.java [new file with mode: 0644]

diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/measurefilters/package-info.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/measurefilters/package-info.java
new file mode 100644 (file)
index 0000000..4700c0a
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+@javax.annotation.ParametersAreNonnullByDefault
+package org.sonar.plugins.core.measurefilters;
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/package-info.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/package-info.java
new file mode 100644 (file)
index 0000000..145b58b
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+@javax.annotation.ParametersAreNonnullByDefault
+package org.sonar.plugins.core.sensors;
index eb258af83adee6de5fbdf02fe6d789508a962e15..5b3746f5dccbccfb1ba620b81364f0d3ac673fd0 100644 (file)
@@ -19,6 +19,7 @@
  */
 package org.sonar.plugins.scm.svn;
 
+import com.google.common.annotations.VisibleForTesting;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.sonar.api.BatchComponent;
@@ -108,21 +109,20 @@ public class SvnBlameCommand implements BlameCommand, BatchComponent {
     });
   }
 
-  public int execute(Command cl, StreamConsumer consumer, StreamConsumer stderr) {
+  private int execute(Command cl, StreamConsumer consumer, StreamConsumer stderr) {
     LOG.debug("Executing: " + cl);
     return commandExecutor.execute(cl, consumer, stderr, -1);
   }
 
-  public Command createCommandLine(File workingDirectory, String filename) {
+  @VisibleForTesting
+  Command createCommandLine(File baseDir, String filename) {
     Command cl = Command.create("svn");
     for (Entry<String, String> env : System.getenv().entrySet()) {
       cl.setEnvironmentVariable(env.getKey(), env.getValue());
     }
     cl.setEnvironmentVariable("LC_MESSAGES", "en");
 
-    if (workingDirectory != null) {
-      cl.setDirectory(workingDirectory);
-    }
+    cl.setDirectory(baseDir);
     cl.addArgument("blame");
     cl.addArgument("--xml");
     cl.addArgument(filename);
diff --git a/sonar-batch/src/main/java/org/sonar/batch/symbol/package-info.java b/sonar-batch/src/main/java/org/sonar/batch/symbol/package-info.java
new file mode 100644 (file)
index 0000000..2ac5be1
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+@javax.annotation.ParametersAreNonnullByDefault
+package org.sonar.batch.symbol;