Class CommentContentRule

  • All Implemented Interfaces:
    JavaParserVisitor, net.sourceforge.pmd.lang.rule.ImmutableLanguage, net.sourceforge.pmd.properties.PropertySource, net.sourceforge.pmd.Rule

    public class CommentContentRule
    extends AbstractCommentRule
    A rule that checks for illegal words in the comment text. TODO implement regex option
    Author:
    Brian Remedios
    • Field Detail

      • CASE_SENSITIVE_DESCRIPTOR

        public static final net.sourceforge.pmd.properties.PropertyDescriptor<java.lang.Boolean> CASE_SENSITIVE_DESCRIPTOR
      • DISSALLOWED_TERMS_DESCRIPTOR

        public static final net.sourceforge.pmd.properties.PropertyDescriptor<java.util.List<java.lang.String>> DISSALLOWED_TERMS_DESCRIPTOR
    • Constructor Detail

      • CommentContentRule

        public CommentContentRule()
    • Method Detail

      • start

        public void start​(net.sourceforge.pmd.RuleContext ctx)
        Capture values and perform all the case-conversions once per run
        Specified by:
        start in interface net.sourceforge.pmd.Rule
        Overrides:
        start in class net.sourceforge.pmd.lang.rule.AbstractRule
      • end

        public void end​(net.sourceforge.pmd.RuleContext ctx)
        .
        Specified by:
        end in interface net.sourceforge.pmd.Rule
        Overrides:
        end in class net.sourceforge.pmd.lang.rule.AbstractRule
        See Also:
        Rule.end(RuleContext)
      • hasDissallowedTerms

        public boolean hasDissallowedTerms()
      • dysfunctionReason

        public java.lang.String dysfunctionReason()
        Specified by:
        dysfunctionReason in interface net.sourceforge.pmd.properties.PropertySource
        Overrides:
        dysfunctionReason in class net.sourceforge.pmd.properties.AbstractPropertySource
        See Also:
        PropertySource.dysfunctionReason()