Class MockRule

  • All Implemented Interfaces:
    PropertySource, Rule

    @Deprecated
    public class MockRule
    extends AbstractRule
    Deprecated.
    This is not a supported API. You need the pmd-test module on your classpath, or pmd-core's test sources. This will be removed in 7.0.0
    This is a Rule implementation which can be used in scenarios where an actual functional Rule is not needed. For example, during unit testing, or as an editable surrogate used by IDE plugins. The Language of this Rule defaults to Java.
    • Method Detail

      • apply

        public void apply​(List<? extends Node> nodes,
                          RuleContext ctx)
        Deprecated.
        Description copied from interface: Rule
        Apply this rule to the given collection of nodes, using the given context.
        Parameters:
        nodes - the nodes
        ctx - the rule context