Attr attributeNode = element.getAttributeNode(ATTR_NAME); if (attributeNode != null) { final String val = attributeNode.getValue(); if (!val.startsWith("android:") && !val.startsWith("ct")) { context.report(ISSUE, attributeNode, context.getLocation(attributeNode), "You must prefix your custom attr by `ct`"); } } }