import com.sonar.orchestrator.OrchestratorBuilder;
import com.sonar.orchestrator.build.BuildResult;
import com.sonar.orchestrator.build.SonarScanner;
+import com.sonar.orchestrator.locator.URLLocation;
import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import org.sonarqube.tests.plugins.checks.JavaCheck;
import org.sonarqube.tests.plugins.checks.JavascriptCheck;
import org.sonarqube.tests.plugins.checks.PhpCheck;
+import org.sonarqube.tests.plugins.checks.PliCheck;
+import org.sonarqube.tests.plugins.checks.PlsqlCheck;
import org.sonarqube.tests.plugins.checks.PythonCheck;
import org.sonarqube.tests.plugins.checks.RpgCheck;
import org.sonarqube.tests.plugins.checks.SwiftCheck;
new JavaCheck(),
new JavascriptCheck(),
new PhpCheck(),
- // SONAR-7618 SonarPLI 1.5.0.702 not compatible with CE not loading @ServerSide
- // new PliCheck(),
+ new PliCheck(),
+ new PlsqlCheck(),
new PythonCheck(),
new RpgCheck(),
new SwiftCheck(),
private static Orchestrator ORCHESTRATOR;
@BeforeClass
- public static void startServer() {
+ public static void startServer() throws MalformedURLException {
OrchestratorBuilder builder = Orchestrator.builderEnv()
.setZipFile(byWildcardMavenFilename(new File("../sonar-application/target"), "sonar*.zip").getFile());
installPlugin(builder, "lua");
installPlugin(builder, "php");
installPlugin(builder, "pitest");
- // SONAR-7618 SonarPLI 1.5.0.702 not compatible with CE not loading @ServerSide
- // installPlugin(builder, "pli");
- // SONAR-7618 SonarPLSQL 2.9.0.901 not compatible with CE not loading @ServerSide
- // installPlugin(builder, "plsql");
+ // SONAR-7618 SonarPLI release 1.5.0.702 not compatible with CE not loading @ServerSide. To be reset to LATEST_RELEASE as soon as SonarPLI 1.5.1 is released.
+ installPlugin(builder, new URL("https://sonarsource.bintray.com/CommercialDistribution/sonar-pli-plugin/sonar-pli-plugin-1.5.1.872.jar"));
+ // SONAR-7618 SonarPLSQL 2.9.0.901 not compatible with CE not loading @ServerSide. To be reset to LATEST_RELEASE as soon as SonarPLSQL 2.9.1 is released.
+ installPlugin(builder, new URL("https://sonarsource.bintray.com/CommercialDistribution/sonar-plsql-plugin/sonar-plsql-plugin-2.9.1.1051.jar"));
installPlugin(builder, "pmd");
// FIXME puppet plugin is temporarily disabled because it is not compatible with SQ 6.4 until usage of Colorizer API is removed
installPlugin(builder, "python");
builder.addPlugin(pluginKey);
}
+ private static void installPlugin(OrchestratorBuilder builder, URL url) {
+ builder.addPlugin(URLLocation.create(url));
+ }
}
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.
+ */
+package org.sonarqube.tests.plugins.checks;
+
+public class PlsqlCheck implements Check {
+
+ public static final String DIR = "src/plsql";
+
+ @Override
+ public void validate(Validation validation) {
+ validation.mustHaveNonEmptySource(DIR);
+ validation.mustHaveSize(DIR);
+ validation.mustHaveComments(DIR);
+ validation.mustHaveComplexity(DIR);
+ validation.mustHaveIssues(DIR + "/has-issues.sql");
+ }
+}