/** * Returns true if the given id represents a valid issue id * * @param id the id to be checked * @return true if the given id is valid */ public final boolean isIssueId(String id) { return getIssue(id) != null; }
describeIssue(registry.getIssue(id)); System.out.println(); } else {
/** * Returns true if the given id represents a valid issue id * * @param id the id to be checked * @return true if the given id is valid */ public final boolean isIssueId(@NonNull String id) { return getIssue(id) != null; }
private void validateIssueIds(@Nullable Project project, @NonNull IssueRegistry registry, @Nullable Collection<String> ids) { if (ids != null) { for (String id : ids) { if (registry.getIssue(id) == null) { reportNonExistingIssueId(project, id); } } } }
private boolean checkSuppressLint(@NonNull PsiAnnotation node, @NonNull String id) { IssueRegistry registry = mContext.getDriver().getRegistry(); Issue issue = registry.getIssue(id); // Special-case the ApiDetector issue, since it does both source file analysis // only on field references, and class file analysis on the rest, so we allow // annotations outside of methods only on fields if (issue != null && !issue.getImplementation().getScope().contains(Scope.JAVA_FILE) || issue == ApiDetector.UNSUPPORTED) { // This issue doesn't have AST access: annotations are not // available for local variables or parameters PsiElement scope = getAnnotationScope(node); mContext.report(INSIDE_METHOD, scope, mContext.getLocation(node), String.format( "The `@SuppressLint` annotation cannot be used on a local " + "variable with the lint check '%1$s': move out to the " + "surrounding method", id)); return false; } return true; } }
private boolean checkId(Annotation node, String id) { IssueRegistry registry = mContext.getDriver().getRegistry(); Issue issue = registry.getIssue(id);