@Override public void visitFunction(FunctionTree tree) { if (!tree.isVendorPrefixed() && tree.standardFunction() instanceof UnknownFunction) { addPreciseIssue( tree.function(), "Remove this usage of the unknown \"" + tree.standardFunction().getName() + "\" function."); } super.visitFunction(tree); }
@Override public boolean isValid(Tree tree) { return tree instanceof FunctionTree && (((FunctionTree) tree).isVendorPrefixed() || allowedFunctions.contains(((FunctionTree) tree).standardFunction().getClass()) || alwaysAllowedFunctions.contains(((FunctionTree) tree).standardFunction().getClass())); }
@Override public void visitFunction(FunctionTree tree) { if (tree.standardFunction() instanceof E) { addPreciseIssue(tree.function(), "Replace deprecated \"e\" escaping function with ~\"value\" syntax."); } super.visitFunction(tree); }
private static boolean isLessElement(Tree tree) { return tree instanceof LessVariableTree || (tree instanceof IdentifierTree && ((IdentifierTree) tree).isLessInterpolated()) || tree instanceof LessEscapingTree || (tree instanceof FunctionTree && ((FunctionTree) tree).standardFunction().isLess()) || tree instanceof LessOperatorTree; }
@Override public void visitFunction(FunctionTree tree) { if (tree.standardFunction() instanceof E) { addPreciseIssue(tree.function(), "Replace deprecated \"e\" escaping function with ~\"value\" syntax."); } super.visitFunction(tree); }
@Override public boolean isValid(Tree tree) { return tree instanceof FunctionTree && (((FunctionTree) tree).isVendorPrefixed() || allowedFunctions.contains(((FunctionTree) tree).standardFunction().getClass()) || alwaysAllowedFunctions.contains(((FunctionTree) tree).standardFunction().getClass())); }
private static boolean isLessElement(Tree tree) { return tree instanceof LessVariableTree || (tree instanceof IdentifierTree && ((IdentifierTree) tree).isLessInterpolated()) || tree instanceof LessEscapingTree || (tree instanceof FunctionTree && ((FunctionTree) tree).standardFunction().isLess()) || tree instanceof LessOperatorTree; }
@Override public void visitFunction(FunctionTree tree) { if (!tree.isVendorPrefixed() && tree.standardFunction() instanceof UnknownFunction) { addPreciseIssue( tree.function(), "Remove this usage of the unknown \"" + tree.standardFunction().getName() + "\" function."); } super.visitFunction(tree); }
@Override public void visitFunction(FunctionTree tree) { if (tree.standardFunction().isObsolete() && !tree.standardFunction().isLess()) { addPreciseIssue( tree.function(), MessageFormat.format( "Remove this usage of the obsolete / not on W3C Standards track \"{0}\" function.", tree.standardFunction().getName())); } super.visitFunction(tree); }
@Override public void visitFunction(FunctionTree tree) { if (!tree.isVendorPrefixed() && (tree.standardFunction() instanceof UnknownFunction || !tree.standardFunction().isCss())) { addPreciseIssue( tree.function(), "Remove this usage of the unknown \"" + tree.standardFunction().getName() + "\" function."); } super.visitFunction(tree); }
@Override public void visitFunction(FunctionTree tree) { if (tree.standardFunction().isObsolete() && !tree.standardFunction().isLess()) { addPreciseIssue( tree.function(), MessageFormat.format( "Remove this usage of the obsolete / not on W3C Standards track \"{0}\" function.", tree.standardFunction().getName())); } super.visitFunction(tree); }
@Override public void visitFunction(FunctionTree tree) { if (!tree.isVendorPrefixed() && (tree.standardFunction() instanceof UnknownFunction || !tree.standardFunction().isCss())) { addPreciseIssue( tree.function(), "Remove this usage of the unknown \"" + tree.standardFunction().getName() + "\" function."); } super.visitFunction(tree); }
@Override public void visitFunction(FunctionTree tree) { if (tree.standardFunction().isObsolete() && tree.standardFunction().isCss()) { addPreciseIssue( tree.function(), MessageFormat.format( "Remove this usage of the obsolete / not on W3C Standards track \"{0}\" function.", tree.standardFunction().getName())); } super.visitFunction(tree); }
private List<String> missingGradients(RulesetTree tree) { List<String> missingGradients = new ArrayList<>(GRADIENTS); for (PropertyDeclarationTree propertyDeclaration : tree.block().propertyDeclarations()) { for (FunctionTree function : propertyDeclaration.value().valueElementsOfType(FunctionTree.class)) { String functionName = function.function().text().toLowerCase(); if (functionName.matches(GRADIENT_MATCHER)) { missingGradients.removeIf(functionName::matches); } } } return missingGradients; }
@Override public void visitFunction(FunctionTree tree) { if (!tree.standardFunction().isLess() && (tree.isVendorPrefixed() || tree.standardFunction().isExperimental())) { addPreciseIssue( tree.function(), "Remove this usage of the experimental \"" + tree.standardFunction().getName() + "\" function."); } super.visitFunction(tree); }
@Override public void visitFunction(FunctionTree tree) { if (tree.standardFunction().isObsolete() && tree.standardFunction().isCss()) { addPreciseIssue( tree.function(), MessageFormat.format( "Remove this usage of the obsolete / not on W3C Standards track \"{0}\" function.", tree.standardFunction().getName())); } super.visitFunction(tree); }