package com.cflint.plugins.core;

import com.cflint.BugList;
import com.cflint.plugins.CFLintScannerAdapter;
import com.cflint.plugins.Context;

import net.htmlparser.jericho.Element;

public class CFXTagChecker extends CFLintScannerAdapter {

    @Override
    public void element(final Element element, final Context context, final BugList bugs) {
        final String tagName = element.getName();
        final String cfmlTagCheck = getParameter("tagName");
        final String scope = getParameter("scope");

        if (cfmlTagCheck != null && tagName.matches(cfmlTagCheck)) {
            if (scope == null || scope.equals("component") && context.isInComponent()) {
                context.addMessage("AVOID_USING_" + tagName.toUpperCase() + "_TAG", tagName);
            }
        }
    }
}

@@ -54,16 +54,38 @@
 ugList;%0A
+import com.cflint.CF;%0A
 import c
@@ -648,19 +648,20 @@
 als(
-%22component%22
+CF.COMPONENT
 ) &&

use constant rather than hard coding string