/** Creates a lint request */ @NonNull protected LintRequest createLintRequest(@NonNull List<File> files) { return new LintRequest(this, files); }
/** * Analyze the given file (which can point to an Android project). Issues found * are reported to the associated {@link LintClient}. * * @param files the files and directories to be analyzed * @param scope the scope of the analysis; detectors with a wider scope will * not be run. If null, the scope will be inferred from the files. * @deprecated use {@link #analyze(LintRequest) instead} */ @Deprecated public void analyze(@NonNull List<File> files, @Nullable EnumSet<Scope> scope) { analyze(new LintRequest(client, files).setScope(scope)); }
configureDriver(driver); LintRequest request = new LintRequest(this, files); if (incrementalCheck != null) { assertEquals(1, files.size());
@Override @NonNull protected LintRequest createLintRequest(@NonNull List<File> files) { LintRequest lintRequest = new LintRequest(this, files); if (Lint.MODEL_LIBRARIES) { LintGradleProject.ProjectSearch search = new LintGradleProject.ProjectSearch(); Project project = search.getProject(this, gradleProject, variant.getName()); lintRequest.setProjects(Collections.singletonList(project)); setCustomRules(search.customViewRuleJars); } else { Pair<LintGradleProject,List<File>> result = LintGradleProject.create( this, modelProject, variant, gradleProject); lintRequest.setProjects(Collections.singletonList(result.getFirst())); setCustomRules(result.getSecond()); } return lintRequest; }
LintRequest request = new LintRequest(this, files); if (incrementalCheck != null) { assertEquals(1, files.size());