diff --git a/pmd-dist/pom.xml b/pmd-dist/pom.xml
index 2e4fcf85c4..1366cf26ff 100644
--- a/pmd-dist/pom.xml
+++ b/pmd-dist/pom.xml
@@ -78,6 +78,11 @@
pmd-fortran
${project.version}
+
+ net.sourceforge.pmd
+ pmd-go
+ ${project.version}
+
net.sourceforge.pmd
pmd-java
diff --git a/pmd-go/pom.xml b/pmd-go/pom.xml
new file mode 100644
index 0000000000..e8a9a075fb
--- /dev/null
+++ b/pmd-go/pom.xml
@@ -0,0 +1,55 @@
+
+
+ 4.0.0
+ pmd-go
+ PMD Go
+
+
+ net.sourceforge.pmd
+ pmd
+ 5.2.0-SNAPSHOT
+
+
+
+ ${basedir}/../pmd-core
+
+
+
+
+
+ maven-resources-plugin
+
+ false
+
+ ${*}
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-site-plugin
+
+ ${project.build.directory}/generated-xdocs
+
+
+
+
+
+
+ net.sourceforge.pmd
+ pmd-core
+
+
+
+ junit
+ junit
+ test
+
+
+ net.sourceforge.pmd
+ pmd-test
+ test
+
+
+
diff --git a/pmd/src/main/java/net/sourceforge/pmd/cpd/GoLanguage.java b/pmd-go/src/main/java/net/sourceforge/pmd/cpd/GoLanguage.java
similarity index 82%
rename from pmd/src/main/java/net/sourceforge/pmd/cpd/GoLanguage.java
rename to pmd-go/src/main/java/net/sourceforge/pmd/cpd/GoLanguage.java
index c997669fdf..c1849bc8a6 100644
--- a/pmd/src/main/java/net/sourceforge/pmd/cpd/GoLanguage.java
+++ b/pmd-go/src/main/java/net/sourceforge/pmd/cpd/GoLanguage.java
@@ -10,6 +10,6 @@ package net.sourceforge.pmd.cpd;
*/
public class GoLanguage extends AbstractLanguage {
public GoLanguage() {
- super(new GoTokenizer(), ".go");
+ super("Go", "go", new GoTokenizer(), ".go");
}
}
diff --git a/pmd/src/main/java/net/sourceforge/pmd/cpd/GoTokenizer.java b/pmd-go/src/main/java/net/sourceforge/pmd/cpd/GoTokenizer.java
similarity index 100%
rename from pmd/src/main/java/net/sourceforge/pmd/cpd/GoTokenizer.java
rename to pmd-go/src/main/java/net/sourceforge/pmd/cpd/GoTokenizer.java
diff --git a/pmd-go/src/main/resources/META-INF/services/net.sourceforge.pmd.cpd.Language b/pmd-go/src/main/resources/META-INF/services/net.sourceforge.pmd.cpd.Language
new file mode 100644
index 0000000000..7d97e302eb
--- /dev/null
+++ b/pmd-go/src/main/resources/META-INF/services/net.sourceforge.pmd.cpd.Language
@@ -0,0 +1 @@
+net.sourceforge.pmd.cpd.GoLanguage
diff --git a/pmd-go/src/site/markdown/index.md b/pmd-go/src/site/markdown/index.md
new file mode 100644
index 0000000000..15872a4ff7
--- /dev/null
+++ b/pmd-go/src/site/markdown/index.md
@@ -0,0 +1,3 @@
+# PMD Go
+
+Only CPD is supported. There are no PMD rules for [Go](https://golang.org/).
diff --git a/pmd-go/src/site/site.xml b/pmd-go/src/site/site.xml
new file mode 100644
index 0000000000..80bb338f06
--- /dev/null
+++ b/pmd-go/src/site/site.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/pom.xml b/pom.xml
index 13c1ca25d9..bdf2988f33 100644
--- a/pom.xml
+++ b/pom.xml
@@ -845,6 +845,7 @@
pmd-cs
pmd-dist
pmd-fortran
+ pmd-go
pmd-java
pmd-javascript
pmd-jsp
diff --git a/src/site/markdown/overview/changelog.md b/src/site/markdown/overview/changelog.md
index fcfe13d1b1..036c075a8c 100644
--- a/src/site/markdown/overview/changelog.md
+++ b/src/site/markdown/overview/changelog.md
@@ -24,6 +24,10 @@ the following two dependencies:
The binary package still contains all languages and can be used as usual.
+**New Languages**
+
+* CPD supports now [Go](https://golang.org/).
+
**Bugfixes:**
**Feature Requests and Improvements:**
@@ -31,6 +35,7 @@ The binary package still contains all languages and can be used as usual.
**Pull requests:**
* [#9](https://github.com/adangel/pmd/pull/9/): New rule: NoUnsanitizedJSPExpressionRule
+* [#44](https://github.com/pmd/pmd/pull/44/): Add GoLang support to CPD
**New/Modified Rules:**