Move Go Language into own sub-module, update changelog

This commit is contained in:
Andreas Dangel
2014-10-12 20:05:17 +02:00
parent e8fadec7de
commit c7d3d2969f
9 changed files with 83 additions and 1 deletions

55
pmd-go/pom.xml Normal file
View File

@@ -0,0 +1,55 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<artifactId>pmd-go</artifactId>
<name>PMD Go</name>
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.2.0-SNAPSHOT</version>
</parent>
<properties>
<config.basedir>${basedir}/../pmd-core</config.basedir>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>
<delimiter>${*}</delimiter>
</delimiters>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<xdocDirectory>${project.build.directory}/generated-xdocs</xdocDirectory>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,15 @@
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.cpd;
/**
* GoLang
*
* @author oinume@gmail.com
*/
public class GoLanguage extends AbstractLanguage {
public GoLanguage() {
super("Go", "go", new GoTokenizer(), ".go");
}
}

View File

@@ -0,0 +1,27 @@
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.cpd;
import java.util.ArrayList;
/**
* GoLang
*
* @author oinume@gmail.com
*/
public class GoTokenizer extends AbstractTokenizer {
public GoTokenizer() {
// setting markers for "string" in Go
this.stringToken = new ArrayList<String>();
this.stringToken.add("\"");
this.stringToken.add("`");
// setting markers for 'ignorable character' in Go
this.ignorableCharacter = new ArrayList<String>();
this.ignorableCharacter.add(";");
// setting markers for 'ignorable string' in Go
this.ignorableStmt = new ArrayList<String>();
}
}

View File

@@ -0,0 +1 @@
net.sourceforge.pmd.cpd.GoLanguage

View File

@@ -0,0 +1,3 @@
# PMD Go
Only CPD is supported. There are no PMD rules for [Go](https://golang.org/).

12
pmd-go/src/site/site.xml Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/DECORATION/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
name="PMD Go">
<body>
<menu ref="parent"/>
<menu ref="reports"/>
</body>
</project>