mirror of
https://github.com/github/codeql.git
synced 2026-01-04 10:10:20 +01:00
fix tests
This commit is contained in:
@@ -434,19 +434,27 @@ public class AutoBuild {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the autobuilder has seen code.
|
||||
* This is overridden in tests.
|
||||
*/
|
||||
protected boolean hasSeenCode() {
|
||||
return seenCode;
|
||||
}
|
||||
|
||||
/** Perform extraction. */
|
||||
public int run() throws IOException {
|
||||
startThreadPool();
|
||||
try {
|
||||
extractSource();
|
||||
extractXml();
|
||||
if (seenCode) { // don't bother with the externs if no code was seen
|
||||
if (hasSeenCode()) { // don't bother with the externs if no code was seen
|
||||
extractExterns();
|
||||
}
|
||||
} finally {
|
||||
shutdownThreadPool();
|
||||
}
|
||||
if (!seenCode) {
|
||||
if (!hasSeenCode()) {
|
||||
if (seenFiles) {
|
||||
warn("Only found JavaScript or TypeScript files that were empty or contained syntax errors.");
|
||||
} else {
|
||||
|
||||
@@ -119,6 +119,11 @@ public class AutoBuildTests {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean hasSeenCode() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void verifyTypeScriptInstallation(ExtractorState state) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user