diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2010-09-23 15:14:09 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2010-09-23 15:14:09 +0000 |
commit | 98a9a7f8c3e1f8d440b943e8d1f27dba6ae93233 (patch) | |
tree | aeff40148b36b67ca2ce2e95e3f69b6b9285eaae | |
parent | 6f6dec3d769b3cd93e3f3c6d236e8a8f672284fe (diff) | |
download | sonarqube-98a9a7f8c3e1f8d440b943e8d1f27dba6ae93233.tar.gz sonarqube-98a9a7f8c3e1f8d440b943e8d1f27dba6ae93233.zip |
SONAR-1706 Depreciate sonar.reuseExistingRulesConfiguration
3 files changed, 13 insertions, 0 deletions
diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleConfiguration.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleConfiguration.java index 88ed5f9aabf..62a111bd082 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleConfiguration.java +++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleConfiguration.java @@ -57,6 +57,7 @@ public class CheckstyleConfiguration implements BatchExtension { public File getXMLDefinitionFile() { if (project.getReuseExistingRulesConfig()) { + LOG.warn("Reusing existing Checkstyle configuration is deprecated as it's unstable and can not provide meaningful results. This feature will be removed soon."); return findExistingXML(); } diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsMavenPluginHandler.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsMavenPluginHandler.java index e7e45ac3017..37091a968f0 100644 --- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsMavenPluginHandler.java +++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsMavenPluginHandler.java @@ -24,6 +24,8 @@ import java.io.IOException; import java.io.StringWriter; import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.sonar.api.CoreProperties; import org.sonar.api.batch.maven.MavenPlugin; import org.sonar.api.batch.maven.MavenPluginHandler; @@ -37,6 +39,8 @@ import org.sonar.plugins.findbugs.xml.Match; public class FindbugsMavenPluginHandler implements MavenPluginHandler { + private static Logger LOG = LoggerFactory.getLogger(FindbugsMavenPluginHandler.class); + private RulesProfile profile; private FindbugsProfileExporter exporter; @@ -89,6 +93,9 @@ public class FindbugsMavenPluginHandler implements MavenPluginHandler { String existingIncludeFilterConfig = plugin.getParameter("includeFilterFile"); String existingExcludeFilterConfig = plugin.getParameter("excludeFilterFile"); boolean existingConfig = !StringUtils.isBlank(existingIncludeFilterConfig) || !StringUtils.isBlank(existingExcludeFilterConfig); + if (project.getReuseExistingRulesConfig()) { + LOG.warn("Reusing existing Findbugs configuration is deprecated as it's unstable and can not provide meaningful results. This feature will be removed soon."); + } if ( !project.getReuseExistingRulesConfig() || (project.getReuseExistingRulesConfig() && !existingConfig)) { File includeXmlFile = saveIncludeConfigXml(project); plugin.setParameter("includeFilterFile", getPath(includeXmlFile)); diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdConfiguration.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdConfiguration.java index 86ca2e5e32d..a03b8dd077e 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdConfiguration.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdConfiguration.java @@ -25,6 +25,8 @@ import java.io.StringWriter; import java.util.Arrays; import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.sonar.api.BatchExtension; import org.sonar.api.CoreProperties; import org.sonar.api.batch.maven.MavenPlugin; @@ -34,6 +36,8 @@ import org.sonar.api.resources.Project; public class PmdConfiguration implements BatchExtension { + private static Logger LOG = LoggerFactory.getLogger(PmdConfiguration.class); + private PmdProfileExporter pmdProfileExporter; private RulesProfile rulesProfile; private Project project; @@ -46,6 +50,7 @@ public class PmdConfiguration implements BatchExtension { public List<String> getRulesets() { if (project.getReuseExistingRulesConfig()) { + LOG.warn("Reusing existing PMD configuration is deprecated as it's unstable and can not provide meaningful results. This feature will be removed soon."); return getDeclaredRulesets(); } return Arrays.asList(saveXmlFile().getAbsolutePath()); |