From 8c6cd5ae55501055f90b2e54350eaa33f19d0190 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 28 Jan 2014 00:04:48 +0100 Subject: [PATCH] Fix some quality flaws --- .../sonar/plugins/xoo/base/XooConstants.java | 31 ---------------- .../sonar/plugins/xoo/base/XooRuleKeys.java | 36 ------------------- .../sonar/plugins/xoo/rules/package-info.java | 23 ------------ .../org/sonar/core/rule/CacheRuleFinder.java | 1 - 4 files changed, 91 deletions(-) delete mode 100644 plugins/sonar-xoo-plugin/src/main/java/org/sonar/plugins/xoo/base/XooConstants.java delete mode 100644 plugins/sonar-xoo-plugin/src/main/java/org/sonar/plugins/xoo/base/XooRuleKeys.java delete mode 100644 plugins/sonar-xoo-plugin/src/main/java/org/sonar/plugins/xoo/rules/package-info.java diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/plugins/xoo/base/XooConstants.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/plugins/xoo/base/XooConstants.java deleted file mode 100644 index 9cff3d68521..00000000000 --- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/plugins/xoo/base/XooConstants.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2013 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. - */ -package org.sonar.plugins.xoo.base; - -public final class XooConstants { - - public static final String LANGUAGE_KEY = "xoo"; - public static final String PROFILE_KEY = "xoo"; - public static final String REPOSITORY_KEY = "xoo"; - - private XooConstants() { - // Only constants - } -} diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/plugins/xoo/base/XooRuleKeys.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/plugins/xoo/base/XooRuleKeys.java deleted file mode 100644 index 688dfe13250..00000000000 --- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/plugins/xoo/base/XooRuleKeys.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2013 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. - */ -package org.sonar.plugins.xoo.base; - -public class XooRuleKeys { - - public static final String RULE_MINIMAL = "minimal"; - public static final String RULE_WITH_PARAMS = "params"; - - public static final String RULE_WITH_TAGS1 = "tags1"; - public static final String RULE_WITH_TAGS12 = "tags12"; - public static final String RULE_WITH_TAGS123 = "tags123"; - public static final String RULE_WITH_TAGS23 = "tags23"; - public static final String RULE_WITH_TAGS34 = "tags34"; - - private XooRuleKeys() { - // Only constants - } -} diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/plugins/xoo/rules/package-info.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/plugins/xoo/rules/package-info.java deleted file mode 100644 index cfe9cb3e7c8..00000000000 --- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/plugins/xoo/rules/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2013 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. - */ -@ParametersAreNonnullByDefault -package org.sonar.plugins.xoo.rules; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/sonar-core/src/main/java/org/sonar/core/rule/CacheRuleFinder.java b/sonar-core/src/main/java/org/sonar/core/rule/CacheRuleFinder.java index a8c3a528127..595481e51e0 100644 --- a/sonar-core/src/main/java/org/sonar/core/rule/CacheRuleFinder.java +++ b/sonar-core/src/main/java/org/sonar/core/rule/CacheRuleFinder.java @@ -24,7 +24,6 @@ import com.google.common.collect.HashBiMap; import com.google.common.collect.Maps; import org.sonar.api.rules.Rule; import org.sonar.api.rules.RuleQuery; -import org.sonar.core.rule.DefaultRuleFinder; import org.sonar.jpa.session.DatabaseSessionFactory; import java.util.Map; -- 2.39.5