From 72719bd0c37dafadc375c01871f876fbde8768e4 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 11 Oct 2014 11:23:07 +0200 Subject: [PATCH] Move C# into own sub-module --- pmd-cs/pom.xml | 121 ++++++++++++++++++ .../net/sourceforge/pmd/cpd/CsLanguage.java | 0 .../net/sourceforge/pmd/cpd/CsTokenizer.java | 0 .../pmd/lang/cs/CsLanguageModule.java | 17 +++ .../net.sourceforge.pmd.lang.Language | 1 + pmd-cs/src/site/markdown/index.md | 3 + pmd-cs/src/site/site.xml | 12 ++ .../sourceforge/pmd/cpd/CsTokenizerTest.java | 0 pmd-dist/pom.xml | 5 + pom.xml | 1 + 10 files changed, 160 insertions(+) create mode 100644 pmd-cs/pom.xml rename {pmd-core => pmd-cs}/src/main/java/net/sourceforge/pmd/cpd/CsLanguage.java (100%) rename {pmd-core => pmd-cs}/src/main/java/net/sourceforge/pmd/cpd/CsTokenizer.java (100%) create mode 100644 pmd-cs/src/main/java/net/sourceforge/pmd/lang/cs/CsLanguageModule.java create mode 100644 pmd-cs/src/main/resources/META-INF/services/net.sourceforge.pmd.lang.Language create mode 100644 pmd-cs/src/site/markdown/index.md create mode 100644 pmd-cs/src/site/site.xml rename {pmd-core => pmd-cs}/src/test/java/net/sourceforge/pmd/cpd/CsTokenizerTest.java (100%) diff --git a/pmd-cs/pom.xml b/pmd-cs/pom.xml new file mode 100644 index 0000000000..c0cd626516 --- /dev/null +++ b/pmd-cs/pom.xml @@ -0,0 +1,121 @@ + + + 4.0.0 + pmd-cs + PMD C# + + + net.sourceforge.pmd + pmd + 5.2.0-SNAPSHOT + + + + ${basedir}/../pmd-core + + + + + + maven-resources-plugin + + false + + ${*} + + + + + + + + net.sourceforge.pmd + pmd-core + ${project.version} + + + net.sourceforge.pmd + pmd-test + ${project.version} + + + org.apache.ant + ant + provided + + + org.apache.ant + ant-testutil + test + + + jaxen + jaxen + + + xercesImpl + xerces + + + xalan + xalan + + + icu4j + com.ibm.icu + + + + + com.beust + jcommander + + + org.ow2.asm + asm + + + net.sourceforge.saxon + saxon + + + net.sourceforge.saxon + saxon + dom + runtime + + + junit + junit + test + + + xerces + xercesImpl + jar + compile + + + net.java.dev.javacc + javacc + + + commons-io + commons-io + + + org.mockito + mockito-all + test + + + org.apache.commons + commons-lang3 + + + org.slf4j + slf4j-api + test + + + diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/cpd/CsLanguage.java b/pmd-cs/src/main/java/net/sourceforge/pmd/cpd/CsLanguage.java similarity index 100% rename from pmd-core/src/main/java/net/sourceforge/pmd/cpd/CsLanguage.java rename to pmd-cs/src/main/java/net/sourceforge/pmd/cpd/CsLanguage.java diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/cpd/CsTokenizer.java b/pmd-cs/src/main/java/net/sourceforge/pmd/cpd/CsTokenizer.java similarity index 100% rename from pmd-core/src/main/java/net/sourceforge/pmd/cpd/CsTokenizer.java rename to pmd-cs/src/main/java/net/sourceforge/pmd/cpd/CsTokenizer.java diff --git a/pmd-cs/src/main/java/net/sourceforge/pmd/lang/cs/CsLanguageModule.java b/pmd-cs/src/main/java/net/sourceforge/pmd/lang/cs/CsLanguageModule.java new file mode 100644 index 0000000000..4039c95c89 --- /dev/null +++ b/pmd-cs/src/main/java/net/sourceforge/pmd/lang/cs/CsLanguageModule.java @@ -0,0 +1,17 @@ +/** + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ +package net.sourceforge.pmd.lang.cs; + +import net.sourceforge.pmd.lang.BaseLanguageModule; + +public class CsLanguageModule extends BaseLanguageModule { + + public static final String NAME = "C#"; + public static final String TERSE_NAME = "cs"; + + public CsLanguageModule() { + super(NAME, null, TERSE_NAME, null, "cs"); + addVersion("", null, true); + } +} diff --git a/pmd-cs/src/main/resources/META-INF/services/net.sourceforge.pmd.lang.Language b/pmd-cs/src/main/resources/META-INF/services/net.sourceforge.pmd.lang.Language new file mode 100644 index 0000000000..1b979f896f --- /dev/null +++ b/pmd-cs/src/main/resources/META-INF/services/net.sourceforge.pmd.lang.Language @@ -0,0 +1 @@ +net.sourceforge.pmd.lang.cs.CsLanguageModule diff --git a/pmd-cs/src/site/markdown/index.md b/pmd-cs/src/site/markdown/index.md new file mode 100644 index 0000000000..4a4bca4837 --- /dev/null +++ b/pmd-cs/src/site/markdown/index.md @@ -0,0 +1,3 @@ +# PMD C## + +Only CPD is supported. There are no PMD rules for C#. diff --git a/pmd-cs/src/site/site.xml b/pmd-cs/src/site/site.xml new file mode 100644 index 0000000000..e7be177e12 --- /dev/null +++ b/pmd-cs/src/site/site.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/cpd/CsTokenizerTest.java b/pmd-cs/src/test/java/net/sourceforge/pmd/cpd/CsTokenizerTest.java similarity index 100% rename from pmd-core/src/test/java/net/sourceforge/pmd/cpd/CsTokenizerTest.java rename to pmd-cs/src/test/java/net/sourceforge/pmd/cpd/CsTokenizerTest.java diff --git a/pmd-dist/pom.xml b/pmd-dist/pom.xml index ace8d176b4..2e4fcf85c4 100644 --- a/pmd-dist/pom.xml +++ b/pmd-dist/pom.xml @@ -68,6 +68,11 @@ pmd-cpp ${project.version} + + net.sourceforge.pmd + pmd-cs + ${project.version} + net.sourceforge.pmd pmd-fortran diff --git a/pom.xml b/pom.xml index 3fb8f6f0ab..15d8f0668e 100644 --- a/pom.xml +++ b/pom.xml @@ -837,6 +837,7 @@ pmd-core pmd-cpp + pmd-cs pmd-dist pmd-fortran pmd-java