Trace Go when Go extraction reconciliation is enabled

This commit is contained in:
Henry Mercer
2022-09-01 14:40:54 +01:00
parent fe1bd9ac76
commit cf5d465980
39 changed files with 272 additions and 110 deletions

View File

@@ -20,6 +20,7 @@ import {
parsePacksSpecification,
prettyPrintPack,
} from "./config-utils";
import { FeatureFlag, FeatureFlags } from "./feature-flags";
import { Language } from "./languages";
import { Logger } from "./logging";
@@ -817,3 +818,14 @@ export function listFolder(dir: string): string[] {
}
return files;
}
export async function isGoExtractionReconciliationEnabled(
featureFlags: FeatureFlags
): Promise<boolean> {
return (
process.env["CODEQL_ACTION_RECONCILE_GO_EXTRACTION"] === "true" ||
(await featureFlags.getValue(
FeatureFlag.GolangExtractionReconciliationEnabled
))
);
}