From 8f9f400c747be05ef95682b871672cb0de6bddec Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov Date: Fri, 18 Feb 2011 03:04:49 +0300 Subject: [PATCH] SONAR-2145 Remove Clover from the Sonar Core --- plugins/sonar-clover-plugin/pom.xml | 76 - .../sonar/plugins/clover/CloverConstants.java | 31 - .../clover/CloverMavenInitializer.java | 81 - .../clover/CloverMavenPluginHandler.java | 132 -- .../sonar/plugins/clover/CloverPlugin.java | 62 - .../sonar/plugins/clover/CloverSensor.java | 57 - .../sonar/plugins/clover/XmlReportParser.java | 207 -- .../clover/CloverMavenInitializerTest.java | 62 - .../clover/CloverMavenPluginHandlerTest.java | 76 - .../plugins/clover/CloverPluginTest.java | 33 - .../plugins/clover/XmlReportParserTest.java | 150 -- .../overrideConfiguration.xml | 30 - .../shouldSkipCloverWithPomConfig.xml | 30 - .../shouldSkipCloverWithPomProperty.xml | 32 - .../clover/XmlReportParserTest/clover.xml | 458 ----- .../XmlReportParserTest/clover_2_3_2.xml | 1793 ----------------- .../clover.xml | 12 - .../org/sonar/plugins/clover/clover.license | 1 - pom.xml | 1 - 19 files changed, 3324 deletions(-) delete mode 100644 plugins/sonar-clover-plugin/pom.xml delete mode 100644 plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverConstants.java delete mode 100644 plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenInitializer.java delete mode 100644 plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenPluginHandler.java delete mode 100644 plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverPlugin.java delete mode 100644 plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverSensor.java delete mode 100644 plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/XmlReportParser.java delete mode 100644 plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverMavenInitializerTest.java delete mode 100644 plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverMavenPluginHandlerTest.java delete mode 100644 plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverPluginTest.java delete mode 100644 plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/XmlReportParserTest.java delete mode 100644 plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/CloverMavenPluginHandlerTest/overrideConfiguration.xml delete mode 100644 plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/CloverMavenPluginHandlerTest/shouldSkipCloverWithPomConfig.xml delete mode 100644 plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/CloverMavenPluginHandlerTest/shouldSkipCloverWithPomProperty.xml delete mode 100644 plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/XmlReportParserTest/clover.xml delete mode 100644 plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/XmlReportParserTest/clover_2_3_2.xml delete mode 100644 plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/XmlReportParserTest/coverageShouldBeZeroWhenNoElements/clover.xml delete mode 100644 plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/clover.license diff --git a/plugins/sonar-clover-plugin/pom.xml b/plugins/sonar-clover-plugin/pom.xml deleted file mode 100644 index a50467d408f..00000000000 --- a/plugins/sonar-clover-plugin/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - 4.0.0 - - org.codehaus.sonar - sonar - 2.7-SNAPSHOT - ../.. - - org.codehaus.sonar.plugins - sonar-clover-plugin - sonar-plugin - Sonar :: Plugins :: Clover - - - - - ${basedir}/src/main/resources - - - ${basedir}/src/test/resources - - - - - org.codehaus.sonar - sonar-packaging-maven-plugin - true - - clover - Clover - org.sonar.plugins.clover.CloverPlugin - Atlassian Clover.]]> - - - - - org.apache.maven.plugins - maven-surefire-plugin - - classes - 3 - true - - - - - - - - org.codehaus.sonar - sonar-plugin-api - ${project.version} - - - org.codehaus.sonar - sonar-java-api - ${project.version} - - - - - org.apache.maven - maven-project - provided - - - - org.codehaus.sonar - sonar-testing-harness - test - - - diff --git a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverConstants.java b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverConstants.java deleted file mode 100644 index b59bac436da..00000000000 --- a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverConstants.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2011 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar 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. - * - * Sonar 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 Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.plugins.clover; - -public interface CloverConstants { - - String LICENSE_PROPERTY = "sonar.clover.license.secured"; - String VERSION_PROPERTY = "sonar.clover.version"; - String DEFAULT_VERSION = "2.6.3"; - String REPORT_PATH_PROPERTY = "sonar.clover.reportPath"; - - String MAVEN_GROUP_ID = "com.atlassian.maven.plugins"; - String MAVEN_ARTIFACT_ID = "maven-clover2-plugin"; -} diff --git a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenInitializer.java b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenInitializer.java deleted file mode 100644 index 28ae571629f..00000000000 --- a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenInitializer.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2011 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar 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. - * - * Sonar 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 Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.plugins.clover; - -import org.apache.commons.configuration.Configuration; -import org.sonar.api.batch.CoverageExtension; -import org.sonar.api.batch.Initializer; -import org.sonar.api.batch.maven.DependsUponMavenPlugin; -import org.sonar.api.batch.maven.MavenPlugin; -import org.sonar.api.batch.maven.MavenPluginHandler; -import org.sonar.api.resources.Project; - -/** - * Provides {@link CloverMavenPluginHandler} and configures correct path to report. - * Enabled only in Maven environment. - */ -public class CloverMavenInitializer extends Initializer implements CoverageExtension, DependsUponMavenPlugin { - - private CloverMavenPluginHandler handler; - - public CloverMavenInitializer(CloverMavenPluginHandler handler) { - this.handler = handler; - } - - public MavenPluginHandler getMavenPluginHandler(Project project) { - if (project.getAnalysisType().equals(Project.AnalysisType.DYNAMIC)) { - return handler; - } - return null; - } - - @Override - public boolean shouldExecuteOnProject(Project project) { - return project.getAnalysisType().isDynamic(true) && - project.getFileSystem().hasJavaSourceFiles(); - } - - @Override - public void execute(Project project) { - Configuration conf = project.getConfiguration(); - if (!conf.containsKey(CloverConstants.REPORT_PATH_PROPERTY)) { - String report = getReportPathFromPluginConfiguration(project); - if (report == null) { - report = getDefaultReportPath(project); - } - conf.setProperty(CloverConstants.REPORT_PATH_PROPERTY, report); - } - } - - private String getDefaultReportPath(Project project) { - return project.getFileSystem().getReportOutputDir() + "/clover/clover.xml"; - } - - private String getReportPathFromPluginConfiguration(Project project) { - MavenPlugin plugin = MavenPlugin.getPlugin(project.getPom(), CloverConstants.MAVEN_GROUP_ID, CloverConstants.MAVEN_ARTIFACT_ID); - if (plugin != null) { - String path = plugin.getParameter("outputDirectory"); - if (path != null) { - return path + "/clover.xml"; - } - } - return null; - } -} diff --git a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenPluginHandler.java b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenPluginHandler.java deleted file mode 100644 index 48d5c8e37c9..00000000000 --- a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenPluginHandler.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2011 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar 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. - * - * Sonar 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 Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.plugins.clover; - -import org.apache.commons.configuration.Configuration; -import org.apache.commons.io.FileUtils; -import org.apache.commons.lang.StringUtils; -import org.sonar.api.CoreProperties; -import org.sonar.api.batch.maven.MavenPlugin; -import org.sonar.api.batch.maven.MavenPluginHandler; -import org.sonar.api.batch.maven.MavenSurefireUtils; -import org.sonar.api.resources.Project; -import org.sonar.java.api.JavaUtils; - -import java.io.File; -import java.io.IOException; -import java.util.Collection; - -public class CloverMavenPluginHandler implements MavenPluginHandler { - - private Configuration conf; - - public CloverMavenPluginHandler(Configuration conf) { - this.conf = conf; - } - - public String getGroupId() { - return CloverConstants.MAVEN_GROUP_ID; - } - - public String getArtifactId() { - return CloverConstants.MAVEN_ARTIFACT_ID; - } - - public String getVersion() { - return conf.getString(CloverConstants.VERSION_PROPERTY, CloverConstants.DEFAULT_VERSION); - } - - public boolean isFixedVersion() { - return false; - } - - public String[] getGoals() { - return new String[] { "instrument", "clover" }; - } - - public void configure(Project project, MavenPlugin cloverPlugin) { - configureParameters(project, cloverPlugin); - configureLicense(project, cloverPlugin); - configureSurefire(project, cloverPlugin); - } - - private void configureSurefire(Project project, MavenPlugin cloverPlugin) { - MavenSurefireUtils.configure(project); - boolean skipCloverLaunch = project.getConfiguration().getBoolean("maven.clover.skip", false); - if (!skipCloverLaunch) { - String skipInPomConfig = cloverPlugin.getParameter("skip"); - skipCloverLaunch = StringUtils.isNotBlank(skipInPomConfig) ? Boolean.parseBoolean(skipInPomConfig) : false; - } - if (!project.getConfiguration().containsKey(CoreProperties.SUREFIRE_REPORTS_PATH_PROPERTY) && !skipCloverLaunch) { - project.getConfiguration().setProperty(CoreProperties.SUREFIRE_REPORTS_PATH_PROPERTY, - new File(project.getFileSystem().getBuildDir(), "clover/surefire-reports").getAbsolutePath()); - } - } - - protected void configureParameters(Project project, MavenPlugin cloverPlugin) { - cloverPlugin.setParameter("generateXml", "true"); - String javaVersion = JavaUtils.getTargetVersion(project); - if (javaVersion != null) { - cloverPlugin.setParameter("jdk", javaVersion); - } - if (project.getExclusionPatterns() != null) { - for (String pattern : project.getExclusionPatterns()) { - cloverPlugin.addParameter("excludes/exclude", pattern); - } - } - } - - protected void configureLicense(Project project, MavenPlugin cloverPlugin) { - if (!hasLicense(cloverPlugin) && getGlobalLicense(project) != null) { - String license = getGlobalLicense(project); - File licenseFile = writeLicenseToDisk(project, license); - cloverPlugin.setParameter("licenseLocation", licenseFile.getAbsolutePath()); - } - } - - private boolean hasLicense(MavenPlugin cloverPlugin) { - return StringUtils.isNotBlank(cloverPlugin.getParameter("license")) - || StringUtils.isNotBlank(cloverPlugin.getParameter("licenseLocation")); - } - - private File writeLicenseToDisk(Project project, String license) { - try { - File file = new File(project.getFileSystem().getSonarWorkingDirectory(), "clover.license"); - FileUtils.writeStringToFile(file, license); - return file; - } catch (IOException e) { - throw new RuntimeException("can not write the clover license", e); - } - } - - private String getGlobalLicense(Project project) { - Object value = project.getProperty(CloverConstants.LICENSE_PROPERTY); - if (value != null) { - if (value instanceof String) { - return (String) value; - - } else if (value instanceof Collection) { - return StringUtils.join(((Collection) value), ""); - } - } - return null; - } - -} diff --git a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverPlugin.java b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverPlugin.java deleted file mode 100644 index 9cbd76de8aa..00000000000 --- a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverPlugin.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2011 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar 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. - * - * Sonar 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 Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.plugins.clover; - -import org.sonar.api.Plugin; -import org.sonar.api.Properties; -import org.sonar.api.Property; - -import java.util.Arrays; -import java.util.List; - -@Properties({ - @Property( - key = CloverConstants.LICENSE_PROPERTY, - name = "License", - description = "You can obtain a free 30 day evaluation license or purchase a commercial license at http://my.atlassian.com.", - project = true, global = true), - @Property( - key = CloverConstants.REPORT_PATH_PROPERTY, - name = "Report path", - description = "Absolute or relative path to XML report file.", - project = true, global = true), - @Property( - key = CloverConstants.VERSION_PROPERTY, - name = "Clover version", - description = "Override the Clover version to use. Default value is read from pom, else " + CloverConstants.DEFAULT_VERSION, - project = true, global = true) }) -public class CloverPlugin implements Plugin { - - public String getKey() { - return "clover"; - } - - public String getName() { - return "Clover"; - } - - public String getDescription() { - return "Clover measures code coverage generated by system tests, functional tests or unit tests, allowing to improve test quality and find bugs sooner. You can find more by going to the Atlassian Clover web site."; - } - - public List getExtensions() { - return Arrays.asList(CloverMavenPluginHandler.class, CloverMavenInitializer.class, CloverSensor.class); - } -} diff --git a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverSensor.java b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverSensor.java deleted file mode 100644 index f6b8a2d3923..00000000000 --- a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverSensor.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2011 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar 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. - * - * Sonar 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 Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.plugins.clover; - -import java.io.File; - -import org.slf4j.LoggerFactory; -import org.sonar.api.batch.CoverageExtension; -import org.sonar.api.batch.Sensor; -import org.sonar.api.batch.SensorContext; -import org.sonar.api.resources.Project; - -public class CloverSensor implements Sensor, CoverageExtension { - - public boolean shouldExecuteOnProject(Project project) { - return project.getFileSystem().hasJavaSourceFiles(); - } - - public void analyse(Project project, SensorContext context) { - File report = getReportFromProperty(project); - if (reportExists(report)) { - new XmlReportParser(context).collect(report); - } else { - LoggerFactory.getLogger(getClass()).info("Clover XML report not found"); - } - } - - private File getReportFromProperty(Project project) { - String path = (String) project.getProperty(CloverConstants.REPORT_PATH_PROPERTY); - if (path != null) { - return project.getFileSystem().resolvePath(path); - } - return null; - } - - private boolean reportExists(File report) { - return report != null && report.exists() && report.isFile(); - } - -} diff --git a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/XmlReportParser.java b/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/XmlReportParser.java deleted file mode 100644 index c9d47cca0ff..00000000000 --- a/plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/XmlReportParser.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2011 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar 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. - * - * Sonar 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 Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.plugins.clover; - -import org.apache.commons.lang.StringUtils; -import org.codehaus.staxmate.in.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.sonar.api.batch.SensorContext; -import org.sonar.api.measures.CoreMetrics; -import org.sonar.api.measures.PropertiesBuilder; -import org.sonar.api.resources.JavaFile; -import org.sonar.api.resources.JavaPackage; -import org.sonar.api.resources.Resource; -import org.sonar.api.utils.ParsingUtils; -import static org.sonar.api.utils.ParsingUtils.scaleValue; -import org.sonar.api.utils.StaxParser; -import org.sonar.api.utils.XmlParserException; - -import java.io.File; -import java.text.ParseException; -import javax.xml.stream.XMLStreamException; - -public class XmlReportParser { - - private static final Logger LOG = LoggerFactory.getLogger(XmlReportParser.class); - private SensorContext context; - final PropertiesBuilder lineHitsBuilder = new PropertiesBuilder(CoreMetrics.COVERAGE_LINE_HITS_DATA); - final PropertiesBuilder branchHitsBuilder = new PropertiesBuilder(CoreMetrics.BRANCH_COVERAGE_HITS_DATA); - - public XmlReportParser(SensorContext context) { - this.context = context; - } - - private boolean reportExists(File report) { - return report != null && report.exists() && report.isFile(); - } - - protected void collect(File xmlFile) { - try { - if (reportExists(xmlFile)) { - LOG.info("Parsing " + xmlFile.getCanonicalPath()); - StaxParser parser = new StaxParser(new StaxParser.XmlStreamHandler() { - public void stream(SMHierarchicCursor rootCursor) throws XMLStreamException { - try { - collectProjectMeasures(rootCursor.advance()); - } catch (ParseException e) { - throw new XMLStreamException(e); - } - } - }); - parser.parse(xmlFile); - } - } catch (Exception e) { - throw new XmlParserException(e); - } - } - - private void collectProjectMeasures(SMInputCursor rootCursor) throws ParseException, XMLStreamException { - SMInputCursor projectCursor = rootCursor.descendantElementCursor("project"); - SMInputCursor projectChildrenCursor = projectCursor.advance().childElementCursor(); - projectChildrenCursor.setFilter(new SimpleFilter(SMEvent.START_ELEMENT)); - - SMInputCursor metricsCursor = projectChildrenCursor.advance(); - analyseMetricsNode(null, metricsCursor); - collectPackageMeasures(projectChildrenCursor); - } - - private void analyseMetricsNode(Resource resource, SMInputCursor metricsCursor) throws ParseException, XMLStreamException { - int elements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("elements")); - if (elements == 0) { - return; - } - - int statements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("statements")); - int methods = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("methods")); - int conditionals = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("conditionals")); - int coveredElements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredelements")); - int coveredStatements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredstatements")); - int coveredMethods = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredmethods")); - int coveredConditionals = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredconditionals")); - - context.saveMeasure(resource, CoreMetrics.COVERAGE, calculateCoverage(coveredElements, elements)); - - context.saveMeasure(resource, CoreMetrics.LINE_COVERAGE, calculateCoverage(coveredMethods + coveredStatements, methods + statements)); - context.saveMeasure(resource, CoreMetrics.LINES_TO_COVER, (double) (statements + methods)); - context.saveMeasure(resource, CoreMetrics.UNCOVERED_LINES, (double) (statements + methods - coveredStatements - coveredMethods)); - - if (conditionals > 0) { - context.saveMeasure(resource, CoreMetrics.BRANCH_COVERAGE, calculateCoverage(coveredConditionals, conditionals)); - context.saveMeasure(resource, CoreMetrics.CONDITIONS_TO_COVER, (double) (conditionals)); - context.saveMeasure(resource, CoreMetrics.UNCOVERED_CONDITIONS, (double) (conditionals - coveredConditionals)); - } - } - - private double calculateCoverage(int coveredElements, int elements) { - if (elements > 0) { - return scaleValue(100.0 * ((double) coveredElements / (double) elements)); - } - return 0.0; - } - - private void collectPackageMeasures(SMInputCursor packCursor) throws ParseException, XMLStreamException { - while (packCursor.getNext() != null) { - JavaPackage pack = new JavaPackage(packCursor.getAttrValue("name")); - SMInputCursor packChildrenCursor = packCursor.descendantElementCursor(); - packChildrenCursor.setFilter(new SimpleFilter(SMEvent.START_ELEMENT)); - SMInputCursor metricsCursor = packChildrenCursor.advance(); - analyseMetricsNode(pack, metricsCursor); - collectFileMeasures(packChildrenCursor, pack); - } - } - - private void collectFileMeasures(SMInputCursor fileCursor, JavaPackage pack) throws ParseException, XMLStreamException { - fileCursor.setFilter(SMFilterFactory.getElementOnlyFilter("file")); - while (fileCursor.getNext() != null) { - if (fileCursor.asEvent().isStartElement()) { - String classKey = extractClassName(fileCursor.getAttrValue("name")); - if (classKey != null) { - SMInputCursor fileChildrenCursor = fileCursor.childCursor(new SimpleFilter(SMEvent.START_ELEMENT)); - // cursor should be on the metrics element - if (canBeIncludedInFileMetrics(fileChildrenCursor)) { - JavaFile resource = new JavaFile(pack.getKey(), classKey, false); - analyseMetricsNode(resource, fileChildrenCursor); - - // cursor should be now on the line cursor - saveHitsData(resource, fileChildrenCursor); - } - } - } - } - } - - private void saveHitsData(Resource resource, SMInputCursor lineCursor) throws ParseException, XMLStreamException { - lineHitsBuilder.clear(); - branchHitsBuilder.clear(); - boolean hasBranches = false; - - while (lineCursor.getNext() != null) { - // skip class elements on format 2_3_2 - if (lineCursor.getLocalName().equals("class")) { - continue; - } - final String lineId = lineCursor.getAttrValue("num"); - int hits; - String count = lineCursor.getAttrValue("count"); - if (StringUtils.isBlank(count)) { - int trueCount = (int) ParsingUtils.parseNumber(lineCursor.getAttrValue("truecount")); - int falseCount = (int) ParsingUtils.parseNumber(lineCursor.getAttrValue("falsecount")); - hits = trueCount + falseCount; - String branchHits; - if (trueCount > 0 && falseCount > 0) { - branchHits = "100%"; - } else if (trueCount == 0 && falseCount == 0) { - branchHits = "0%"; - } else { - branchHits = "50%"; - } - branchHitsBuilder.add(lineId, branchHits); - hasBranches = true; - - } else { - hits = (int) ParsingUtils.parseNumber(count); - } - lineHitsBuilder.add(lineId, hits); - } - context.saveMeasure(resource, lineHitsBuilder.build()); - if (hasBranches) { - context.saveMeasure(resource, branchHitsBuilder.build()); - } - } - - private boolean canBeIncludedInFileMetrics(SMInputCursor metricsCursor) throws ParseException, XMLStreamException { - while (metricsCursor.getNext() != null && metricsCursor.getLocalName().equals("class")) { - // skip class elements on 1.x xml format - } - return ParsingUtils.parseNumber(metricsCursor.getAttrValue("elements")) > 0; - } - - protected String extractClassName(String filename) { - if (filename != null) { - filename = StringUtils.replaceChars(filename, '\\', '/'); - filename = StringUtils.substringBeforeLast(filename, ".java"); - if (filename.indexOf('/') >= 0) { - filename = StringUtils.substringAfterLast(filename, "/"); - } - } - return filename; - } -} \ No newline at end of file diff --git a/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverMavenInitializerTest.java b/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverMavenInitializerTest.java deleted file mode 100644 index f2ead9ddf84..00000000000 --- a/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverMavenInitializerTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2011 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar 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. - * - * Sonar 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 Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.plugins.clover; - -import org.apache.commons.configuration.PropertiesConfiguration; -import org.junit.Before; -import org.junit.Test; -import org.sonar.api.resources.Project; - -import static org.hamcrest.Matchers.nullValue; -import static org.hamcrest.core.IsNot.not; -import static org.junit.Assert.assertThat; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -public class CloverMavenInitializerTest { - - private Project project; - private CloverMavenInitializer initializer; - - @Before - public void setUp() { - project = mock(Project.class); - initializer = new CloverMavenInitializer(new CloverMavenPluginHandler(new PropertiesConfiguration())); - } - - @Test - public void doNotExecuteMavenPluginIfReuseReports() { - when(project.getAnalysisType()).thenReturn(Project.AnalysisType.REUSE_REPORTS); - assertThat(initializer.getMavenPluginHandler(project), nullValue()); - } - - @Test - public void doNotExecuteMavenPluginIfStaticAnalysis() { - when(project.getAnalysisType()).thenReturn(Project.AnalysisType.STATIC); - assertThat(initializer.getMavenPluginHandler(project), nullValue()); - } - - @Test - public void executeMavenPluginIfDynamicAnalysis() { - when(project.getAnalysisType()).thenReturn(Project.AnalysisType.DYNAMIC); - assertThat(initializer.getMavenPluginHandler(project), not(nullValue())); - } - -} diff --git a/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverMavenPluginHandlerTest.java b/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverMavenPluginHandlerTest.java deleted file mode 100644 index 3b63d6a2b6b..00000000000 --- a/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverMavenPluginHandlerTest.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2011 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar 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. - * - * Sonar 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 Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.plugins.clover; - -import org.apache.commons.configuration.PropertiesConfiguration; -import org.junit.Before; -import org.junit.Test; -import org.sonar.api.CoreProperties; -import org.sonar.api.batch.maven.MavenPlugin; -import org.sonar.api.resources.Project; -import org.sonar.api.test.MavenTestUtils; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.*; - -public class CloverMavenPluginHandlerTest { - - private CloverMavenPluginHandler handler; - private Project project; - private MavenPlugin plugin; - - @Before - public void init() { - handler = new CloverMavenPluginHandler(new PropertiesConfiguration()); - } - - private void configurePluginHandler(String pom) { - project = MavenTestUtils.loadProjectFromPom(getClass(), pom); - plugin = MavenPlugin.getPlugin(project.getPom(), handler.getGroupId(), handler.getArtifactId()); - handler.configure(project, plugin); - } - - @Test - public void overrideConfiguration() throws Exception { - configurePluginHandler("overrideConfiguration.xml"); - - assertThat(plugin.getParameter("generateXml"), is("true")); - assertThat(plugin.getParameter("foo"), is("bar")); - String configuredReportPath = project.getConfiguration().getString(CoreProperties.SUREFIRE_REPORTS_PATH_PROPERTY); - assertThat(configuredReportPath, notNullValue()); - configuredReportPath = configuredReportPath.replace('\\', '/'); - assertThat(configuredReportPath, endsWith("clover/surefire-reports")); - } - - @Test - public void shouldSkipCloverWithPomConfig() throws Exception { - configurePluginHandler("shouldSkipCloverWithPomConfig.xml"); - - assertThat(project.getConfiguration().getString(CoreProperties.SUREFIRE_REPORTS_PATH_PROPERTY), nullValue()); - } - - @Test - public void shouldSkipCloverWithPomProperty() throws Exception { - configurePluginHandler("shouldSkipCloverWithPomProperty.xml"); - - assertThat(project.getConfiguration().getString(CoreProperties.SUREFIRE_REPORTS_PATH_PROPERTY), nullValue()); - } - -} diff --git a/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverPluginTest.java b/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverPluginTest.java deleted file mode 100644 index a759caee39c..00000000000 --- a/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverPluginTest.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2011 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar 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. - * - * Sonar 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 Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.plugins.clover; - -import static org.hamcrest.number.OrderingComparisons.greaterThan; -import static org.junit.Assert.assertThat; - -import org.junit.Test; - -public class CloverPluginTest { - - @Test - public void someExtensions() { - assertThat(new CloverPlugin().getExtensions().size(), greaterThan(1)); - } -} diff --git a/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/XmlReportParserTest.java b/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/XmlReportParserTest.java deleted file mode 100644 index 8219edd4489..00000000000 --- a/plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/XmlReportParserTest.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2011 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar 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. - * - * Sonar 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 Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.plugins.clover; - -import org.junit.Before; -import org.junit.Test; -import org.sonar.api.batch.SensorContext; -import org.sonar.api.measures.CoreMetrics; -import org.sonar.api.resources.JavaFile; -import org.sonar.api.resources.JavaPackage; -import org.sonar.api.resources.Resource; -import org.sonar.api.test.IsMeasure; -import org.sonar.test.TestUtils; - -import java.io.File; -import java.net.URISyntaxException; -import java.text.ParseException; - -import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.anyDouble; -import static org.mockito.Matchers.anyObject; -import static org.mockito.Matchers.argThat; -import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.*; - -public class XmlReportParserTest { - - private XmlReportParser reportParser; - private SensorContext context; - private File xmlFile; - - @Before - public void before() throws URISyntaxException { - xmlFile = TestUtils.getResource(getClass(), "clover.xml"); - context = mock(SensorContext.class); - reportParser = new XmlReportParser(context); - } - - @Test - public void collectProjectMeasures() throws Exception { - reportParser.collect(xmlFile); - verify(context).saveMeasure(null, CoreMetrics.COVERAGE, 5.0); // coveredelements / elements - - verify(context).saveMeasure(null, CoreMetrics.LINE_COVERAGE, 6.63); // covered methods + covered statements / methods + statements - verify(context).saveMeasure(null, CoreMetrics.LINES_TO_COVER, 196.0); - verify(context).saveMeasure(null, CoreMetrics.UNCOVERED_LINES, 183.0); // covered methods + covered statements - - verify(context).saveMeasure(null, CoreMetrics.BRANCH_COVERAGE, 0.0); // covered conditionals / conditionals - verify(context).saveMeasure(null, CoreMetrics.CONDITIONS_TO_COVER, 64.0); // covered_conditionals - verify(context).saveMeasure(null, CoreMetrics.UNCOVERED_CONDITIONS, 64.0); - } - - @Test - public void collectPackageMeasures() throws ParseException { - reportParser.collect(xmlFile); - final JavaPackage pac = new JavaPackage("org.sonar.samples"); - verify(context).saveMeasure(pac, CoreMetrics.COVERAGE, 28.89); - - // lines - verify(context).saveMeasure(pac, CoreMetrics.LINE_COVERAGE, 28.89); - verify(context).saveMeasure(pac, CoreMetrics.LINES_TO_COVER, 45.0); - verify(context).saveMeasure(pac, CoreMetrics.UNCOVERED_LINES, 32.0); - - // no conditions - verify(context, never()).saveMeasure(eq(pac), eq(CoreMetrics.BRANCH_COVERAGE), anyDouble()); - verify(context, never()).saveMeasure(eq(pac), eq(CoreMetrics.CONDITIONS_TO_COVER), anyDouble()); - verify(context, never()).saveMeasure(eq(pac), eq(CoreMetrics.UNCOVERED_CONDITIONS), anyDouble()); - } - - @Test - public void parseClaver232Format() throws ParseException, URISyntaxException { - reportParser.collect(TestUtils.getResource(getClass(), "clover_2_3_2.xml")); - verify(context).saveMeasure(new JavaPackage("org.sonar.squid.sensors"), CoreMetrics.COVERAGE, 94.87); - } - -// @Test -// public void doNotSaveInnerClassMeasures() throws ParseException, URISyntaxException { -// collector.collect(xmlFile); -// -// verify(context, never()).saveMeasure( -// eq(new JavaFile("ch.hortis.sonar.model.MetricMetaInf.Classes")), eq(CoreMetrics.COVERAGE), anyDouble()); -// verify(context).saveMeasure( -// eq(new JavaFile("ch.hortis.sonar.model.MetricMetaInf")), eq(CoreMetrics.COVERAGE), anyDouble()); -// } - - @Test - public void collectFileMeasures() throws Exception { - reportParser.collect(xmlFile); - - final JavaFile file = new JavaFile("org.sonar.samples.ClassUnderTest"); - verify(context).saveMeasure(file, CoreMetrics.COVERAGE, 100.0); - - verify(context).saveMeasure(file, CoreMetrics.LINE_COVERAGE, 100.0); - verify(context).saveMeasure(file, CoreMetrics.LINES_TO_COVER, 5.0); - verify(context).saveMeasure(file, CoreMetrics.UNCOVERED_LINES, 0.0); - - // no conditions - verify(context, never()).saveMeasure(eq(file), eq(CoreMetrics.BRANCH_COVERAGE), anyDouble()); - verify(context, never()).saveMeasure(eq(file), eq(CoreMetrics.CONDITIONS_TO_COVER), anyDouble()); - verify(context, never()).saveMeasure(eq(file), eq(CoreMetrics.UNCOVERED_CONDITIONS), anyDouble()); - } - - @Test - public void collectFileHitsData() throws Exception { - reportParser.collect(xmlFile); - verify(context).saveMeasure(eq(new JavaFile("org.sonar.samples.ClassUnderTest")), argThat(new IsMeasure(CoreMetrics.COVERAGE_LINE_HITS_DATA, "4=1;5=1;6=1;8=1;9=1"))); - } - - @Test - public void clover1FileNameContainsPath() { - XmlReportParser reportParser = new XmlReportParser(context); - assertEquals("SampleClass", reportParser.extractClassName("C:\\src\\main\\java\\org\\sonar\\samples\\SampleClass.java")); - - assertEquals("SampleClass", reportParser.extractClassName("/src/main/java/org/sonar/samples/SampleClass.java")); - } - - @Test - public void clover2FileNameDoesNotContainPath() { - XmlReportParser reportParser = new XmlReportParser(context); - assertEquals("SampleClass", reportParser.extractClassName("SampleClass.java")); - } - - @Test - public void coverageShouldBeZeroWhenNoElements() throws URISyntaxException { - File xmlFile = TestUtils.getResource(getClass(), "coverageShouldBeZeroWhenNoElements/clover.xml"); - context = mock(SensorContext.class); - XmlReportParser reportParser = new XmlReportParser(context); - reportParser.collect(xmlFile); - verify(context, never()).saveMeasure((Resource) anyObject(), eq(CoreMetrics.COVERAGE), anyDouble()); - verify(context, never()).saveMeasure((Resource) anyObject(), eq(CoreMetrics.LINE_COVERAGE), anyDouble()); - verify(context, never()).saveMeasure((Resource) anyObject(), eq(CoreMetrics.BRANCH_COVERAGE), anyDouble()); - } -} diff --git a/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/CloverMavenPluginHandlerTest/overrideConfiguration.xml b/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/CloverMavenPluginHandlerTest/overrideConfiguration.xml deleted file mode 100644 index 0f87740a626..00000000000 --- a/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/CloverMavenPluginHandlerTest/overrideConfiguration.xml +++ /dev/null @@ -1,30 +0,0 @@ - - 4.0.0 - foo - bar - 0.2-SNAPSHOT - jar - - - - com.atlassian.maven.plugins - maven-clover2-plugin - - /foo - true - false - true - bar - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - - - - - \ No newline at end of file diff --git a/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/CloverMavenPluginHandlerTest/shouldSkipCloverWithPomConfig.xml b/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/CloverMavenPluginHandlerTest/shouldSkipCloverWithPomConfig.xml deleted file mode 100644 index 399c626ffb1..00000000000 --- a/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/CloverMavenPluginHandlerTest/shouldSkipCloverWithPomConfig.xml +++ /dev/null @@ -1,30 +0,0 @@ - - 4.0.0 - foo - bar - 0.2-SNAPSHOT - jar - - - - com.atlassian.maven.plugins - maven-clover2-plugin - - /foo - true - false - true - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - - - - - \ No newline at end of file diff --git a/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/CloverMavenPluginHandlerTest/shouldSkipCloverWithPomProperty.xml b/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/CloverMavenPluginHandlerTest/shouldSkipCloverWithPomProperty.xml deleted file mode 100644 index 7d25ed0f2c5..00000000000 --- a/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/CloverMavenPluginHandlerTest/shouldSkipCloverWithPomProperty.xml +++ /dev/null @@ -1,32 +0,0 @@ - - 4.0.0 - foo - bar - 0.2-SNAPSHOT - jar - - - - com.atlassian.maven.plugins - maven-clover2-plugin - - /foo - true - false - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - - - - - - true - - \ No newline at end of file diff --git a/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/XmlReportParserTest/clover.xml b/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/XmlReportParserTest/clover.xml deleted file mode 100644 index c81752eed3b..00000000000 --- a/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/XmlReportParserTest/clover.xml +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/XmlReportParserTest/clover_2_3_2.xml b/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/XmlReportParserTest/clover_2_3_2.xml deleted file mode 100644 index 320229039aa..00000000000 --- a/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/XmlReportParserTest/clover_2_3_2.xml +++ /dev/null @@ -1,1793 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/XmlReportParserTest/coverageShouldBeZeroWhenNoElements/clover.xml b/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/XmlReportParserTest/coverageShouldBeZeroWhenNoElements/clover.xml deleted file mode 100644 index 39eb1a210c6..00000000000 --- a/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/XmlReportParserTest/coverageShouldBeZeroWhenNoElements/clover.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/clover.license b/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/clover.license deleted file mode 100644 index e6a566048b3..00000000000 --- a/plugins/sonar-clover-plugin/src/test/resources/org/sonar/plugins/clover/clover.license +++ /dev/null @@ -1 +0,0 @@ -foo=bar :o) \ No newline at end of file diff --git a/pom.xml b/pom.xml index bb484bef99a..02ab27f3172 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,6 @@ plugins/sonar-checkstyle-plugin plugins/sonar-pmd-plugin plugins/sonar-cobertura-plugin - plugins/sonar-clover-plugin plugins/sonar-surefire-plugin plugins/sonar-googleanalytics-plugin plugins/sonar-findbugs-plugin -- 2.39.5