Skip to content

Commit

Permalink
Tidy up createdDBForScannedLanguages
Browse files Browse the repository at this point in the history
Now the test is fixed, we can simplify by introducing an async call.
  • Loading branch information
Henry Mercer committed Sep 1, 2022
1 parent 6d34731 commit e460fa2
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 17 deletions.
6 changes: 3 additions & 3 deletions lib/analyze.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/analyze.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions lib/analyze.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/analyze.test.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/analyze.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,6 @@ for (const options of [
await createdDBForScannedLanguages(
codeqlObject,
stubConfig,
false, // Disable Go extraction reconciliation
getRunnerLogger(true),
createFeatureFlags(options.featureFlags)
);
Expand Down
11 changes: 2 additions & 9 deletions src/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ async function setupPythonExtractor(logger: Logger) {
export async function createdDBForScannedLanguages(
codeql: CodeQL,
config: configUtils.Config,
isGoExtractionReconciliationEnabled: boolean,
logger: Logger,
featureFlags: FeatureFlags
) {
Expand All @@ -133,7 +132,7 @@ export async function createdDBForScannedLanguages(
if (
isScannedLanguage(
language,
isGoExtractionReconciliationEnabled,
await util.isGoExtractionReconciliationEnabled(featureFlags),
logger
) &&
!dbIsFinalized(config, language, logger)
Expand Down Expand Up @@ -179,13 +178,7 @@ async function finalizeDatabaseCreation(
const codeql = await getCodeQL(config.codeQLCmd);

const extractionStart = performance.now();
await createdDBForScannedLanguages(
codeql,
config,
await util.isGoExtractionReconciliationEnabled(featureFlags),
logger,
featureFlags
);
await createdDBForScannedLanguages(codeql, config, logger, featureFlags);
const extractionTime = performance.now() - extractionStart;

const trapImportStart = performance.now();
Expand Down

0 comments on commit e460fa2

Please sign in to comment.