diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-12-07 15:45:24 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-12-07 16:02:17 +0100 |
commit | 42f17286694370e73b48db38cbc3b328ff10764c (patch) | |
tree | 7454a9547a82e16eaef4bb10e09aa7b0b7239297 /plugins | |
parent | 70eac6ea0e564da3735a3d80065326cee10c7c48 (diff) | |
download | sonarqube-42f17286694370e73b48db38cbc3b328ff10764c.tar.gz sonarqube-42f17286694370e73b48db38cbc3b328ff10764c.zip |
Fix quality flaws
Diffstat (limited to 'plugins')
3 files changed, 46 insertions, 4 deletions
diff --git a/plugins/sonar-l10n-en-plugin/pom.xml b/plugins/sonar-l10n-en-plugin/pom.xml index 33651911c6e..43d7967b0f6 100644 --- a/plugins/sonar-l10n-en-plugin/pom.xml +++ b/plugins/sonar-l10n-en-plugin/pom.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> @@ -20,6 +21,18 @@ <artifactId>sonar-plugin-api</artifactId> <scope>provided</scope> </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.easytesting</groupId> + <artifactId>fest-assert</artifactId> + <scope>test</scope> + </dependency> + </dependencies> <build> diff --git a/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/EnglishPackPlugin.java b/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/EnglishPackPlugin.java index 19e8bb2262e..787788fc8ad 100644 --- a/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/EnglishPackPlugin.java +++ b/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/EnglishPackPlugin.java @@ -19,8 +19,6 @@ */ package org.sonar.plugins.l10n; -import org.sonar.api.Extension; - import org.sonar.api.SonarPlugin; import java.util.Collections; @@ -28,7 +26,7 @@ import java.util.List; public final class EnglishPackPlugin extends SonarPlugin { - public List<Class<? extends Extension>> getExtensions() { + public List<?> getExtensions() { return Collections.emptyList(); } } diff --git a/plugins/sonar-l10n-en-plugin/src/test/java/org/sonar/plugins/l10n/EnglishPackPluginTest.java b/plugins/sonar-l10n-en-plugin/src/test/java/org/sonar/plugins/l10n/EnglishPackPluginTest.java new file mode 100644 index 00000000000..6987233f554 --- /dev/null +++ b/plugins/sonar-l10n-en-plugin/src/test/java/org/sonar/plugins/l10n/EnglishPackPluginTest.java @@ -0,0 +1,31 @@ +/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2012 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.l10n; + +import org.junit.Test; + +import static org.fest.assertions.Assertions.assertThat; + +public class EnglishPackPluginTest { + @Test + public void no_extensions() { + assertThat(new EnglishPackPlugin().getExtensions()).isEmpty(); + } +} |