diff --git a/pmd-javascript/pom.xml b/pmd-javascript/pom.xml new file mode 100644 index 0000000000..7e276a4efe --- /dev/null +++ b/pmd-javascript/pom.xml @@ -0,0 +1,137 @@ + + + 4.0.0 + pmd-javascript + PMD JavaScript + + + net.sourceforge.pmd + pmd-aggregate + 5.1.4-SNAPSHOT + + + + + + maven-resources-plugin + + false + + ${*} + + + + + + + com.atlassian.maven.plugins + maven-clover2-plugin + + ${java.version} + ${basedir}/../pmd/licences/clover2.license + + + + pre-site + + instrument + + + + + + + + + net.sourceforge.pmd + pmd + ${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/src/main/java/net/sourceforge/pmd/lang/ecmascript/Ecmascript3Handler.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/Ecmascript3Handler.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/Ecmascript3Handler.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/Ecmascript3Handler.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/Ecmascript3Parser.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/Ecmascript3Parser.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/Ecmascript3Parser.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/Ecmascript3Parser.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/EcmascriptLanguageModule.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/EcmascriptLanguageModule.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/EcmascriptLanguageModule.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/EcmascriptLanguageModule.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/EcmascriptParserOptions.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/EcmascriptParserOptions.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/EcmascriptParserOptions.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/EcmascriptParserOptions.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayComprehension.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayComprehension.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayComprehension.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayComprehension.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayComprehensionLoop.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayComprehensionLoop.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayComprehensionLoop.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayComprehensionLoop.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayLiteral.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayLiteral.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayLiteral.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayLiteral.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAssignment.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAssignment.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAssignment.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAssignment.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAstRoot.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAstRoot.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAstRoot.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAstRoot.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTBlock.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTBlock.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTBlock.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTBlock.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTBreakStatement.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTBreakStatement.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTBreakStatement.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTBreakStatement.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTCatchClause.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTCatchClause.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTCatchClause.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTCatchClause.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTComment.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTComment.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTComment.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTComment.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTConditionalExpression.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTConditionalExpression.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTConditionalExpression.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTConditionalExpression.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTContinueStatement.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTContinueStatement.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTContinueStatement.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTContinueStatement.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTDoLoop.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTDoLoop.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTDoLoop.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTDoLoop.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTElementGet.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTElementGet.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTElementGet.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTElementGet.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTEmptyExpression.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTEmptyExpression.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTEmptyExpression.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTEmptyExpression.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTExpressionStatement.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTExpressionStatement.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTExpressionStatement.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTExpressionStatement.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTForInLoop.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTForInLoop.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTForInLoop.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTForInLoop.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTForLoop.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTForLoop.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTForLoop.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTForLoop.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionCall.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionCall.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionCall.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionCall.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionNode.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionNode.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionNode.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionNode.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTIfStatement.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTIfStatement.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTIfStatement.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTIfStatement.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTInfixExpression.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTInfixExpression.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTInfixExpression.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTInfixExpression.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTKeywordLiteral.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTKeywordLiteral.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTKeywordLiteral.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTKeywordLiteral.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTLabel.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTLabel.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTLabel.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTLabel.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTLabeledStatement.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTLabeledStatement.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTLabeledStatement.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTLabeledStatement.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTLetNode.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTLetNode.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTLetNode.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTLetNode.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTName.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTName.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTName.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTName.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTNewExpression.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTNewExpression.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTNewExpression.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTNewExpression.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTNumberLiteral.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTNumberLiteral.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTNumberLiteral.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTNumberLiteral.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTObjectLiteral.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTObjectLiteral.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTObjectLiteral.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTObjectLiteral.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTObjectProperty.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTObjectProperty.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTObjectProperty.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTObjectProperty.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTParenthesizedExpression.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTParenthesizedExpression.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTParenthesizedExpression.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTParenthesizedExpression.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTPropertyGet.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTPropertyGet.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTPropertyGet.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTPropertyGet.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTRegExpLiteral.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTRegExpLiteral.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTRegExpLiteral.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTRegExpLiteral.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTReturnStatement.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTReturnStatement.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTReturnStatement.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTReturnStatement.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTScope.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTScope.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTScope.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTScope.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTStringLiteral.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTStringLiteral.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTStringLiteral.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTStringLiteral.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTSwitchCase.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTSwitchCase.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTSwitchCase.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTSwitchCase.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTSwitchStatement.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTSwitchStatement.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTSwitchStatement.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTSwitchStatement.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTThrowStatement.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTThrowStatement.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTThrowStatement.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTThrowStatement.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTTryStatement.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTTryStatement.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTTryStatement.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTTryStatement.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTUnaryExpression.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTUnaryExpression.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTUnaryExpression.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTUnaryExpression.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTVariableDeclaration.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTVariableDeclaration.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTVariableDeclaration.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTVariableDeclaration.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTVariableInitializer.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTVariableInitializer.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTVariableInitializer.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTVariableInitializer.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTWhileLoop.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTWhileLoop.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTWhileLoop.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTWhileLoop.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTWithStatement.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTWithStatement.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTWithStatement.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTWithStatement.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTXmlDotQuery.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTXmlDotQuery.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTXmlDotQuery.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTXmlDotQuery.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTXmlExpression.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTXmlExpression.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTXmlExpression.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTXmlExpression.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTXmlMemberGet.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTXmlMemberGet.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTXmlMemberGet.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTXmlMemberGet.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTXmlString.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTXmlString.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTXmlString.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTXmlString.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/AbstractEcmascriptNode.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/AbstractEcmascriptNode.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/AbstractEcmascriptNode.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/AbstractEcmascriptNode.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/AbstractInfixEcmascriptNode.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/AbstractInfixEcmascriptNode.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/AbstractInfixEcmascriptNode.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/AbstractInfixEcmascriptNode.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/DestructuringNode.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/DestructuringNode.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/DestructuringNode.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/DestructuringNode.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/DumpFacade.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/DumpFacade.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/DumpFacade.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/DumpFacade.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptNode.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptNode.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptNode.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptNode.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParser.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParser.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParser.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParser.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserVisitor.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserVisitor.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserVisitor.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserVisitor.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserVisitorAdapter.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserVisitorAdapter.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserVisitorAdapter.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserVisitorAdapter.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptTreeBuilder.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptTreeBuilder.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptTreeBuilder.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptTreeBuilder.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/SourceCodePositioner.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/SourceCodePositioner.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/SourceCodePositioner.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/SourceCodePositioner.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/TrailingCommaNode.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/TrailingCommaNode.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/TrailingCommaNode.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/TrailingCommaNode.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/AbstractEcmascriptRule.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/AbstractEcmascriptRule.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/AbstractEcmascriptRule.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/AbstractEcmascriptRule.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptRuleChainVisitor.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptRuleChainVisitor.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptRuleChainVisitor.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptRuleChainVisitor.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptRuleViolationFactory.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptRuleViolationFactory.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptRuleViolationFactory.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptRuleViolationFactory.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptXPathRule.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptXPathRule.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptXPathRule.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptXPathRule.java diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/basic/ConsistentReturnRule.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/basic/ConsistentReturnRule.java similarity index 100% rename from pmd/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/basic/ConsistentReturnRule.java rename to pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/basic/ConsistentReturnRule.java diff --git a/pmd-javascript/src/main/resources/META-INF/services/net.sourceforge.pmd.lang.Language b/pmd-javascript/src/main/resources/META-INF/services/net.sourceforge.pmd.lang.Language new file mode 100644 index 0000000000..671c306c41 --- /dev/null +++ b/pmd-javascript/src/main/resources/META-INF/services/net.sourceforge.pmd.lang.Language @@ -0,0 +1 @@ +net.sourceforge.pmd.lang.ecmascript.EcmascriptLanguageModule diff --git a/pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/AssignmentInOperand.xml b/pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/AssignmentInOperand.xml similarity index 100% rename from pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/AssignmentInOperand.xml rename to pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/AssignmentInOperand.xml diff --git a/pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/AvoidTrailingComma.xml b/pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/AvoidTrailingComma.xml similarity index 100% rename from pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/AvoidTrailingComma.xml rename to pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/AvoidTrailingComma.xml diff --git a/pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/ConsistentReturn.xml b/pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/ConsistentReturn.xml similarity index 100% rename from pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/ConsistentReturn.xml rename to pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/ConsistentReturn.xml diff --git a/pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/EqualComparison.xml b/pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/EqualComparison.xml similarity index 100% rename from pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/EqualComparison.xml rename to pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/EqualComparison.xml diff --git a/pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/GlobalVariable.xml b/pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/GlobalVariable.xml similarity index 100% rename from pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/GlobalVariable.xml rename to pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/GlobalVariable.xml diff --git a/pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/InnaccurateNumericLiteral.xml b/pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/InnaccurateNumericLiteral.xml similarity index 100% rename from pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/InnaccurateNumericLiteral.xml rename to pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/InnaccurateNumericLiteral.xml diff --git a/pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/ScopeForInVariable.xml b/pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/ScopeForInVariable.xml similarity index 100% rename from pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/ScopeForInVariable.xml rename to pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/ScopeForInVariable.xml diff --git a/pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/UnreachableCode.xml b/pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/UnreachableCode.xml similarity index 100% rename from pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/UnreachableCode.xml rename to pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/UnreachableCode.xml diff --git a/pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/UseBaseWithParseInt.xml b/pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/UseBaseWithParseInt.xml similarity index 100% rename from pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/UseBaseWithParseInt.xml rename to pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/basic/xml/UseBaseWithParseInt.xml diff --git a/pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/braces/xml/ForLoopsMustUseBraces.xml b/pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/braces/xml/ForLoopsMustUseBraces.xml similarity index 100% rename from pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/braces/xml/ForLoopsMustUseBraces.xml rename to pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/braces/xml/ForLoopsMustUseBraces.xml diff --git a/pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/braces/xml/IfElseStmtsMustUseBraces.xml b/pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/braces/xml/IfElseStmtsMustUseBraces.xml similarity index 100% rename from pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/braces/xml/IfElseStmtsMustUseBraces.xml rename to pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/braces/xml/IfElseStmtsMustUseBraces.xml diff --git a/pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/braces/xml/IfStmtsMustUseBraces.xml b/pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/braces/xml/IfStmtsMustUseBraces.xml similarity index 100% rename from pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/braces/xml/IfStmtsMustUseBraces.xml rename to pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/braces/xml/IfStmtsMustUseBraces.xml diff --git a/pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/braces/xml/WhileLoopsMustUseBraces.xml b/pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/braces/xml/WhileLoopsMustUseBraces.xml similarity index 100% rename from pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/braces/xml/WhileLoopsMustUseBraces.xml rename to pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/braces/xml/WhileLoopsMustUseBraces.xml diff --git a/pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/controversial/xml/AvoidWithStatement.xml b/pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/controversial/xml/AvoidWithStatement.xml similarity index 100% rename from pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/controversial/xml/AvoidWithStatement.xml rename to pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/controversial/xml/AvoidWithStatement.xml diff --git a/pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/unnecessary/xml/UnnecessaryBlock.xml b/pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/unnecessary/xml/UnnecessaryBlock.xml similarity index 100% rename from pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/unnecessary/xml/UnnecessaryBlock.xml rename to pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/unnecessary/xml/UnnecessaryBlock.xml diff --git a/pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/unnecessary/xml/UnnecessaryParentheses.xml b/pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/unnecessary/xml/UnnecessaryParentheses.xml similarity index 100% rename from pmd/src/test/resources/net/sourceforge/pmd/lang/ecmascript/rule/unnecessary/xml/UnnecessaryParentheses.xml rename to pmd-javascript/src/main/resources/net/sourceforge/pmd/lang/ecmascript/rule/unnecessary/xml/UnnecessaryParentheses.xml diff --git a/pmd/src/main/resources/rulesets/ecmascript/basic.xml b/pmd-javascript/src/main/resources/rulesets/ecmascript/basic.xml similarity index 100% rename from pmd/src/main/resources/rulesets/ecmascript/basic.xml rename to pmd-javascript/src/main/resources/rulesets/ecmascript/basic.xml diff --git a/pmd/src/main/resources/rulesets/ecmascript/braces.xml b/pmd-javascript/src/main/resources/rulesets/ecmascript/braces.xml similarity index 100% rename from pmd/src/main/resources/rulesets/ecmascript/braces.xml rename to pmd-javascript/src/main/resources/rulesets/ecmascript/braces.xml diff --git a/pmd/src/main/resources/rulesets/ecmascript/controversial.xml b/pmd-javascript/src/main/resources/rulesets/ecmascript/controversial.xml similarity index 100% rename from pmd/src/main/resources/rulesets/ecmascript/controversial.xml rename to pmd-javascript/src/main/resources/rulesets/ecmascript/controversial.xml diff --git a/pmd/src/main/resources/rulesets/ecmascript/rulesets.properties b/pmd-javascript/src/main/resources/rulesets/ecmascript/rulesets.properties similarity index 100% rename from pmd/src/main/resources/rulesets/ecmascript/rulesets.properties rename to pmd-javascript/src/main/resources/rulesets/ecmascript/rulesets.properties diff --git a/pmd/src/main/resources/rulesets/ecmascript/unnecessary.xml b/pmd-javascript/src/main/resources/rulesets/ecmascript/unnecessary.xml similarity index 100% rename from pmd/src/main/resources/rulesets/ecmascript/unnecessary.xml rename to pmd-javascript/src/main/resources/rulesets/ecmascript/unnecessary.xml diff --git a/pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/EcmascriptParserOptionsTest.java b/pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/EcmascriptParserOptionsTest.java similarity index 100% rename from pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/EcmascriptParserOptionsTest.java rename to pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/EcmascriptParserOptionsTest.java diff --git a/pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionNodeTest.java b/pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionNodeTest.java similarity index 100% rename from pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionNodeTest.java rename to pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionNodeTest.java diff --git a/pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTTryStatementTest.java b/pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTTryStatementTest.java similarity index 100% rename from pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTTryStatementTest.java rename to pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTTryStatementTest.java diff --git a/pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserTest.java b/pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserTest.java similarity index 100% rename from pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserTest.java rename to pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserTest.java diff --git a/pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserTestBase.java b/pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserTestBase.java similarity index 100% rename from pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserTestBase.java rename to pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserTestBase.java diff --git a/pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/SourceCodePositionerTest.java b/pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/SourceCodePositionerTest.java similarity index 100% rename from pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/SourceCodePositionerTest.java rename to pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/SourceCodePositionerTest.java diff --git a/pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/rule/basic/BasicRulesTest.java b/pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/rule/basic/BasicRulesTest.java similarity index 100% rename from pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/rule/basic/BasicRulesTest.java rename to pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/rule/basic/BasicRulesTest.java diff --git a/pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/rule/braces/BracesRulesTest.java b/pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/rule/braces/BracesRulesTest.java similarity index 100% rename from pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/rule/braces/BracesRulesTest.java rename to pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/rule/braces/BracesRulesTest.java diff --git a/pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/rule/controversial/ControversialRulesTest.java b/pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/rule/controversial/ControversialRulesTest.java similarity index 100% rename from pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/rule/controversial/ControversialRulesTest.java rename to pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/rule/controversial/ControversialRulesTest.java diff --git a/pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/rule/unnecessary/UnnecessaryRulesTest.java b/pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/rule/unnecessary/UnnecessaryRulesTest.java similarity index 100% rename from pmd/src/test/java/net/sourceforge/pmd/lang/ecmascript/rule/unnecessary/UnnecessaryRulesTest.java rename to pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/rule/unnecessary/UnnecessaryRulesTest.java diff --git a/pmd/src/test/java/net/sourceforge/pmd/lang/ParserOptionsTest.java b/pmd-test/src/main/java/net/sourceforge/pmd/lang/ParserOptionsTest.java similarity index 100% rename from pmd/src/test/java/net/sourceforge/pmd/lang/ParserOptionsTest.java rename to pmd-test/src/main/java/net/sourceforge/pmd/lang/ParserOptionsTest.java diff --git a/pmd-test/src/main/java/net/sourceforge/pmd/testframework/RuleTst.java b/pmd-test/src/main/java/net/sourceforge/pmd/testframework/RuleTst.java index 67fe9aafbf..ee914716a4 100644 --- a/pmd-test/src/main/java/net/sourceforge/pmd/testframework/RuleTst.java +++ b/pmd-test/src/main/java/net/sourceforge/pmd/testframework/RuleTst.java @@ -32,7 +32,6 @@ import net.sourceforge.pmd.RuleSetFactory; import net.sourceforge.pmd.RuleSetNotFoundException; import net.sourceforge.pmd.RuleSets; import net.sourceforge.pmd.RuleViolation; -import net.sourceforge.pmd.lang.Language; import net.sourceforge.pmd.lang.LanguageRegistry; import net.sourceforge.pmd.lang.LanguageVersion; import net.sourceforge.pmd.renderers.TextRenderer; @@ -46,9 +45,6 @@ import org.xml.sax.SAXException; * Advanced methods for test cases */ public abstract class RuleTst { - public static final LanguageVersion DEFAULT_LANGUAGE_VERSION = LanguageRegistry.getLanguage("Java").getVersion("1.5"); - public static final Language DEFAULT_LANGUAGE = DEFAULT_LANGUAGE_VERSION.getLanguage(); - /** * Find a rule in a certain ruleset by name */ @@ -403,12 +399,4 @@ public abstract class RuleTst { } return buffer.toString().trim(); } - - /** - * Run the test using the DEFAULT_LANGUAGE_VERSION and put the violations in the report. - * Convenience method. - */ - public void runTestFromString(String code, Rule rule, Report report) throws PMDException { - runTestFromString(code, rule, report, DEFAULT_LANGUAGE_VERSION); - } } diff --git a/pmd-test/src/main/java/net/sourceforge/pmd/testframework/TestDescriptor.java b/pmd-test/src/main/java/net/sourceforge/pmd/testframework/TestDescriptor.java index 080114eda5..4225b27f43 100644 --- a/pmd-test/src/main/java/net/sourceforge/pmd/testframework/TestDescriptor.java +++ b/pmd-test/src/main/java/net/sourceforge/pmd/testframework/TestDescriptor.java @@ -35,7 +35,7 @@ public class TestDescriptor { } public TestDescriptor(String code, String description, int numberOfProblemsExpected, Rule rule) { - this(code, description, numberOfProblemsExpected, rule, RuleTst.DEFAULT_LANGUAGE_VERSION); + this(code, description, numberOfProblemsExpected, rule, rule.getLanguage().getDefaultVersion()); } public TestDescriptor(String code, String description, int numberOfProblemsExpected, Rule rule, LanguageVersion languageVersion) { diff --git a/pmd/src/main/java/net/sourceforge/pmd/lang/fortran/FortranLanguageModule.java b/pmd/src/main/java/net/sourceforge/pmd/lang/fortran/FortranLanguageModule.java index a49962819f..1123d168b7 100644 --- a/pmd/src/main/java/net/sourceforge/pmd/lang/fortran/FortranLanguageModule.java +++ b/pmd/src/main/java/net/sourceforge/pmd/lang/fortran/FortranLanguageModule.java @@ -1,7 +1,6 @@ package net.sourceforge.pmd.lang.fortran; import net.sourceforge.pmd.lang.BaseLanguageModule; -import net.sourceforge.pmd.lang.ecmascript.rule.EcmascriptRuleChainVisitor; /** * Created by christoferdutz on 20.09.14. @@ -12,7 +11,7 @@ public class FortranLanguageModule extends BaseLanguageModule { public static final String TERSE_NAME = "fortran"; public FortranLanguageModule() { - super(NAME, null, TERSE_NAME, EcmascriptRuleChainVisitor.class, "for", "f", "f66", "f77", "f90"); + super(NAME, null, TERSE_NAME, null, "for", "f", "f66", "f77", "f90"); addVersion("", null, true); } diff --git a/pmd/src/main/resources/META-INF/services/net.sourceforge.pmd.lang.Language b/pmd/src/main/resources/META-INF/services/net.sourceforge.pmd.lang.Language index 277ea304a4..9a9da64fbf 100644 --- a/pmd/src/main/resources/META-INF/services/net.sourceforge.pmd.lang.Language +++ b/pmd/src/main/resources/META-INF/services/net.sourceforge.pmd.lang.Language @@ -1,5 +1,4 @@ net.sourceforge.pmd.lang.cpp.CppLanguageModule -net.sourceforge.pmd.lang.ecmascript.EcmascriptLanguageModule net.sourceforge.pmd.lang.fortran.FortranLanguageModule net.sourceforge.pmd.lang.jsp.JspLanguageModule net.sourceforge.pmd.lang.php.PhpLanguageModule diff --git a/pom.xml b/pom.xml index 0d8f40da64..7a75abd77f 100644 --- a/pom.xml +++ b/pom.xml @@ -629,6 +629,7 @@ pmd pmd-test pmd-java + pmd-javascript pmd-dist