Merge branch 'master' into 7.0.x
Conflicts: pmd-apex-jorje/pom.xml pmd-apex/pom.xml pmd-core/pom.xml pmd-core/src/main/java/net/sourceforge/pmd/lang/LanguageVersionHandler.java pmd-core/src/main/java/net/sourceforge/pmd/util/designer/Designer.java pmd-cpp/pom.xml pmd-cpp/src/main/java/net/sourceforge/pmd/lang/cpp/CppHandler.java pmd-cs/pom.xml pmd-dist/pom.xml pmd-doc/pom.xml pmd-fortran/pom.xml pmd-go/pom.xml pmd-groovy/pom.xml pmd-java/pom.xml pmd-java8/pom.xml pmd-javascript/pom.xml pmd-jsp/pom.xml pmd-kotlin/pom.xml pmd-lang-test/pom.xml pmd-matlab/pom.xml pmd-matlab/src/main/java/net/sourceforge/pmd/lang/matlab/MatlabHandler.java pmd-objectivec/pom.xml pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCHandler.java pmd-perl/pom.xml pmd-php/pom.xml pmd-plsql/pom.xml pmd-python/pom.xml pmd-python/src/main/java/net/sourceforge/pmd/lang/python/PythonHandler.java pmd-ruby/pom.xml pmd-scala/pom.xml pmd-swift/pom.xml pmd-test/pom.xml pmd-ui/pom.xml pmd-visualforce/pom.xml pmd-vm/pom.xml pmd-xml/pom.xml pom.xml
This commit is contained in:
@ -47,23 +47,6 @@
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>pmd-clean</id>
|
||||
<phase>clean</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<echo>PMD specific tasks: cleaning generated markdown</echo>
|
||||
<delete quiet="true">
|
||||
<fileset dir="${basedir}/src/site/markdown/rules/" includes="**/*.md" />
|
||||
<fileset dir="${basedir}/src/site/markdown/" includes="mergedruleset.xml" />
|
||||
<fileset dir="${basedir}/src/site/" includes="site.xml" />
|
||||
</delete>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
|
@ -13,6 +13,7 @@ import net.sourceforge.pmd.lang.ParserOptions;
|
||||
import net.sourceforge.pmd.properties.BooleanProperty;
|
||||
import net.sourceforge.pmd.properties.EnumeratedProperty;
|
||||
|
||||
|
||||
public class EcmascriptParserOptions extends ParserOptions {
|
||||
|
||||
public enum Version {
|
||||
@ -52,6 +53,10 @@ public class EcmascriptParserOptions extends ParserOptions {
|
||||
|
||||
// Note: The UI order values are chosen to be larger than those built into
|
||||
// XPathRule.
|
||||
|
||||
// These aren't converted to the new property framework
|
||||
// Do we need them anyway?
|
||||
|
||||
public static final BooleanProperty RECORDING_COMMENTS_DESCRIPTOR = new BooleanProperty("recordingComments",
|
||||
"Specifies that comments are produced in the AST.", Boolean.TRUE, 3.0f);
|
||||
public static final BooleanProperty RECORDING_LOCAL_JSDOC_COMMENTS_DESCRIPTOR = new BooleanProperty(
|
||||
|
@ -12,6 +12,7 @@ import net.sourceforge.pmd.lang.ParserOptions;
|
||||
import net.sourceforge.pmd.lang.ast.Node;
|
||||
import net.sourceforge.pmd.lang.ecmascript.EcmascriptLanguageModule;
|
||||
import net.sourceforge.pmd.lang.ecmascript.EcmascriptParserOptions;
|
||||
import net.sourceforge.pmd.lang.ecmascript.EcmascriptParserOptions.Version;
|
||||
import net.sourceforge.pmd.lang.ecmascript.ast.ASTArrayComprehension;
|
||||
import net.sourceforge.pmd.lang.ecmascript.ast.ASTArrayComprehensionLoop;
|
||||
import net.sourceforge.pmd.lang.ecmascript.ast.ASTArrayLiteral;
|
||||
@ -65,18 +66,19 @@ import net.sourceforge.pmd.lang.ecmascript.ast.EcmascriptNode;
|
||||
import net.sourceforge.pmd.lang.ecmascript.ast.EcmascriptParserVisitor;
|
||||
import net.sourceforge.pmd.lang.rule.AbstractRule;
|
||||
import net.sourceforge.pmd.lang.rule.ImmutableLanguage;
|
||||
import net.sourceforge.pmd.properties.BooleanProperty;
|
||||
import net.sourceforge.pmd.properties.EnumeratedProperty;
|
||||
import net.sourceforge.pmd.properties.PropertyDescriptor;
|
||||
|
||||
|
||||
public abstract class AbstractEcmascriptRule extends AbstractRule
|
||||
implements EcmascriptParserVisitor, ImmutableLanguage {
|
||||
|
||||
private static final BooleanProperty RECORDING_COMMENTS_DESCRIPTOR = EcmascriptParserOptions.RECORDING_COMMENTS_DESCRIPTOR;
|
||||
private static final BooleanProperty RECORDING_LOCAL_JSDOC_COMMENTS_DESCRIPTOR = EcmascriptParserOptions.RECORDING_LOCAL_JSDOC_COMMENTS_DESCRIPTOR;
|
||||
private static final EnumeratedProperty<EcmascriptParserOptions.Version> RHINO_LANGUAGE_VERSION = EcmascriptParserOptions.RHINO_LANGUAGE_VERSION;
|
||||
private static final PropertyDescriptor<Boolean> RECORDING_COMMENTS_DESCRIPTOR = EcmascriptParserOptions.RECORDING_COMMENTS_DESCRIPTOR;
|
||||
private static final PropertyDescriptor<Boolean> RECORDING_LOCAL_JSDOC_COMMENTS_DESCRIPTOR = EcmascriptParserOptions.RECORDING_LOCAL_JSDOC_COMMENTS_DESCRIPTOR;
|
||||
private static final PropertyDescriptor<Version> RHINO_LANGUAGE_VERSION = EcmascriptParserOptions.RHINO_LANGUAGE_VERSION;
|
||||
|
||||
public AbstractEcmascriptRule() {
|
||||
super.setLanguage(LanguageRegistry.getLanguage(EcmascriptLanguageModule.NAME));
|
||||
// Rule-specific parser options are not supported. What do we do?
|
||||
definePropertyDescriptor(RECORDING_COMMENTS_DESCRIPTOR);
|
||||
definePropertyDescriptor(RECORDING_LOCAL_JSDOC_COMMENTS_DESCRIPTOR);
|
||||
definePropertyDescriptor(RHINO_LANGUAGE_VERSION);
|
||||
|
@ -8,15 +8,16 @@ import net.sourceforge.pmd.lang.LanguageRegistry;
|
||||
import net.sourceforge.pmd.lang.ParserOptions;
|
||||
import net.sourceforge.pmd.lang.ecmascript.EcmascriptLanguageModule;
|
||||
import net.sourceforge.pmd.lang.ecmascript.EcmascriptParserOptions;
|
||||
import net.sourceforge.pmd.lang.ecmascript.EcmascriptParserOptions.Version;
|
||||
import net.sourceforge.pmd.lang.rule.XPathRule;
|
||||
import net.sourceforge.pmd.properties.BooleanProperty;
|
||||
import net.sourceforge.pmd.properties.EnumeratedProperty;
|
||||
import net.sourceforge.pmd.properties.PropertyDescriptor;
|
||||
|
||||
|
||||
public class EcmascriptXPathRule extends XPathRule {
|
||||
|
||||
private static final BooleanProperty RECORDING_COMMENTS_DESCRIPTOR = EcmascriptParserOptions.RECORDING_COMMENTS_DESCRIPTOR;
|
||||
private static final BooleanProperty RECORDING_LOCAL_JSDOC_COMMENTS_DESCRIPTOR = EcmascriptParserOptions.RECORDING_LOCAL_JSDOC_COMMENTS_DESCRIPTOR;
|
||||
private static final EnumeratedProperty<EcmascriptParserOptions.Version> RHINO_LANGUAGE_VERSION = EcmascriptParserOptions.RHINO_LANGUAGE_VERSION;
|
||||
private static final PropertyDescriptor<Boolean> RECORDING_COMMENTS_DESCRIPTOR = EcmascriptParserOptions.RECORDING_COMMENTS_DESCRIPTOR;
|
||||
private static final PropertyDescriptor<Boolean> RECORDING_LOCAL_JSDOC_COMMENTS_DESCRIPTOR = EcmascriptParserOptions.RECORDING_LOCAL_JSDOC_COMMENTS_DESCRIPTOR;
|
||||
private static final PropertyDescriptor<Version> RHINO_LANGUAGE_VERSION = EcmascriptParserOptions.RHINO_LANGUAGE_VERSION;
|
||||
|
||||
public EcmascriptXPathRule() {
|
||||
super.setLanguage(LanguageRegistry.getLanguage(EcmascriptLanguageModule.NAME));
|
||||
|
Reference in New Issue
Block a user