mirror of
https://github.com/github/codeql-action.git
synced 2026-01-01 12:10:20 +08:00
Add messy debug statements
This commit is contained in:
19
lib/analyze.js
generated
19
lib/analyze.js
generated
@@ -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
Reference in New Issue
Block a user