forked from phoedos/pmd
Move Go Language into own sub-module, update changelog
This commit is contained in:
55
pmd-go/pom.xml
Normal file
55
pmd-go/pom.xml
Normal 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>
|
15
pmd-go/src/main/java/net/sourceforge/pmd/cpd/GoLanguage.java
Normal file
15
pmd-go/src/main/java/net/sourceforge/pmd/cpd/GoLanguage.java
Normal 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");
|
||||
}
|
||||
}
|
@@ -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>();
|
||||
}
|
||||
}
|
@@ -0,0 +1 @@
|
||||
net.sourceforge.pmd.cpd.GoLanguage
|
3
pmd-go/src/site/markdown/index.md
Normal file
3
pmd-go/src/site/markdown/index.md
Normal 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
12
pmd-go/src/site/site.xml
Normal 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>
|
Reference in New Issue
Block a user