aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-findbugs-plugin/src
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-03-25 02:56:46 +0300
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-04-04 22:46:21 +0400
commitd4bb3b72f9e188c93d0857d478a3ebc6f52365c1 (patch)
tree0109f7c074ad54661ff60d89bfab215ac3fa02a5 /plugins/sonar-findbugs-plugin/src
parent628bb6718fc76baba8f452691cfc983a000e1397 (diff)
downloadsonarqube-d4bb3b72f9e188c93d0857d478a3ebc6f52365c1.tar.gz
sonarqube-d4bb3b72f9e188c93d0857d478a3ebc6f52365c1.zip
SONAR-1898 Introduce new entry point - SonarPlugin
Diffstat (limited to 'plugins/sonar-findbugs-plugin/src')
-rw-r--r--plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsPlugin.java15
-rw-r--r--plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsPluginTest.java34
2 files changed, 35 insertions, 14 deletions
diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsPlugin.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsPlugin.java
index 994b9e46f46..c234f6b9059 100644
--- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsPlugin.java
+++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsPlugin.java
@@ -39,20 +39,7 @@ import java.util.List;
description = "Specifies the amount of time, in milliseconds, that FindBugs may run before it is assumed to be hung and is terminated. " +
"The default is 600,000 milliseconds, which is ten minutes.",
project = true, module = true, global = true) })
-public class FindbugsPlugin implements Plugin {
-
- public String getKey() {
- return CoreProperties.FINDBUGS_PLUGIN;
- }
-
- public String getName() {
- return "Findbugs";
- }
-
- public String getDescription() {
- return "FindBugs is a program that uses static analysis to look for bugs in Java code. It can detect a variety of common coding mistakes, " +
- "including thread synchronization problems, misuse of API methods... You can find more by going to the <a href='http://findbugs.sourceforge.net'>Findbugs web site</a>.";
- }
+public class FindbugsPlugin extends SonarPlugin {
public List<Class<? extends Extension>> getExtensions() {
List<Class<? extends Extension>> list = new ArrayList<Class<? extends Extension>>();
diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsPluginTest.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsPluginTest.java
new file mode 100644
index 00000000000..c70bbd1704b
--- /dev/null
+++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsPluginTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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.findbugs;
+
+import static org.hamcrest.Matchers.greaterThan;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+
+public class FindbugsPluginTest {
+
+ @Test
+ public void testGetExtensions() {
+ assertThat(new FindbugsPlugin().getExtensions().size(), greaterThan(1));
+ }
+
+}