/** * Adds a user-level suppression directive. The directive must be given in the form 'aspect-rule', * or 'aspect-*' to match any rule. Is used in comments such as '(== suppress_warning http-* ==)' * which will suppress all lint warnings generated by the http aspect. */ // TODO(user): See if we can avoid the type case. public boolean isDiagSuppressed(Diag diag, Location location) { if (location instanceof ProtoLocation) { if (isSuppressedWarning(diag, ((ProtoLocation) location).getElement())) { return true; } } else if (compilerGlobalSuppressionPattern.matcher(diag.getMessage()).matches()) { return true; } return false; }
/** * Adds a user-level suppression directive. The directive must be given in the form 'aspect-rule', * or 'aspect-*' to match any rule. Is used in comments such as '(== suppress_warning http-* ==)' * which will suppress all lint warnings generated by the http aspect. */ // TODO(user): See if we can avoid the type case. public boolean isDiagSuppressed(Diag diag, Location location) { if (location instanceof ProtoLocation) { if (isSuppressedWarning(diag, ((ProtoLocation) location).getElement())) { return true; } } else if (compilerGlobalSuppressionPattern.matcher(diag.getMessage()).matches()) { return true; } return false; }