public void scan(Iterable<File> files) { SourceProject project = new SourceProject("Java Project"); index.index(project); project.setSourceCodeIndexer(index); simpleScan(files); }
@Test public void files() { AstScanner<LexerlessGrammar> scanner = ColdFusionAstScanner.create(new CFConfiguration(Charsets.UTF_8)); scanner.scanFiles( ImmutableList.of( new File("src/test/resources/metrics/Comments.cfc"), new File("src/test/resources/metrics/Functions.cfc"))); SourceProject project = (SourceProject) scanner.getIndex().search(new QueryByType(SourceProject.class)).iterator().next(); assertThat(project.getInt(CFMetric.FILES)).isEqualTo(2); }