Add messy debug statements

This commit is contained in:
Andrew Eisenberg
2021-05-11 11:03:34 -07:00
parent a19f1a7b3c
commit f1d500967a
4 changed files with 41 additions and 15 deletions

19
lib/analyze.js generated
View File

@@ -103,12 +103,18 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
allSarifFiles.push(sarifFile);
}
}
logger.info("111111111");
logger.info("About to start LoC");
logger.info("111111111");
if (allSarifFiles.length > 0) {
const linesOfCode = await count_loc_1.countLoc(path.resolve(),
// config.paths specifies external directories. the current
// directory is included in the analysis by default. Replicate
// that here.
config.paths, config.pathsIgnore, config.languages, logger);
logger.info("22222222");
logger.info("Finished LoC");
logger.info("22222222");
for (const sarifFile of allSarifFiles) {
injectLinesOfCode(sarifFile, language, linesOfCode);
}
@@ -138,8 +144,17 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
fs.writeFileSync(querySuitePath, querySuiteContents);
logger.debug(`Query suite file for ${language}...\n${querySuiteContents}`);
const sarifFile = path.join(destinationFolder, `${language}-${type}.sarif`);
const codeql = codeql_1.getCodeQL(config.codeQLCmd);
await codeql.databaseAnalyze(databasePath, sarifFile, searchPath, querySuitePath, memoryFlag, addSnippetsFlag, threadsFlag, automationDetailsId);
// const codeql = getCodeQL(config.codeQLCmd);
// await codeql.databaseAnalyze(
// databasePath,
// sarifFile,
// searchPath,
// querySuitePath,
// memoryFlag,
// addSnippetsFlag,
// threadsFlag,
// automationDetailsId
// );
logger.debug(`SARIF results for database ${language} created at "${sarifFile}"`);
logger.endGroup();
return sarifFile;

File diff suppressed because one or more lines are too long