use of com.google.devtools.build.lib.actions.extra.ExtraActionInfo in project heron by twitter.
the class JavaCheckstyle method getSourceFiles.
private static String[] getSourceFiles(String extraActionFile, Predicate<CharSequence> predicate) {
ExtraActionInfo info = ExtraActionUtils.getExtraActionInfo(extraActionFile);
JavaCompileInfo jInfo = info.getExtension(JavaCompileInfo.javaCompileInfo);
Collection<String> sourceFiles = Collections2.filter(jInfo.getSourceFileList(), predicate);
return sourceFiles.toArray(new String[sourceFiles.size()]);
}
use of com.google.devtools.build.lib.actions.extra.ExtraActionInfo in project heron by twitter.
the class PythonCheckstyle method getSourceFiles.
@SuppressWarnings("unchecked")
private static Collection<String> getSourceFiles(String extraActionFile) {
ExtraActionInfo info = ExtraActionUtils.getExtraActionInfo(extraActionFile);
SpawnInfo spawnInfo = info.getExtension(SpawnInfo.spawnInfo);
return Collections2.filter(spawnInfo.getInputFileList(), Predicates.and(Predicates.containsPattern(".*/src/.+\\.py[c]{0,1}$"), Predicates.not(Predicates.containsPattern("third_party/"))));
}
Aggregations