mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00: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
5
node_modules/github-linguist/dist/directory.js
generated
vendored
5
node_modules/github-linguist/dist/directory.js
generated
vendored
@@ -154,10 +154,13 @@ class LocDir {
|
||||
ignore: this.exclude,
|
||||
nodir: true
|
||||
});
|
||||
console.log(`Excluding: ${this.exclude}`);
|
||||
|
||||
const files = [];
|
||||
const info = { ...defaultInfo };
|
||||
let languages = {};
|
||||
await Promise.all(paths.map(async (pathItem) => {
|
||||
console.log(`Processing ${pathItem}`);
|
||||
const fullPath = slash2_1.default(path_1.default.join(this.cwd, pathItem));
|
||||
if (!pathItem ||
|
||||
this.ignoreLanguage(pathItem) ||
|
||||
@@ -205,4 +208,4 @@ function ensureArray(arr, dfault) {
|
||||
? arr
|
||||
: [arr];
|
||||
}
|
||||
//# sourceMappingURL=directory.js.map
|
||||
//# sourceMappingURL=directory.js.map
|
||||
|
||||
@@ -190,6 +190,10 @@ export async function runQueries(
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("111111111");
|
||||
logger.info("About to start LoC");
|
||||
logger.info("111111111");
|
||||
|
||||
if (allSarifFiles.length > 0) {
|
||||
const linesOfCode = await countLoc(
|
||||
path.resolve(),
|
||||
@@ -202,6 +206,10 @@ export async function runQueries(
|
||||
logger
|
||||
);
|
||||
|
||||
logger.info("22222222");
|
||||
logger.info("Finished LoC");
|
||||
logger.info("22222222");
|
||||
|
||||
for (const sarifFile of allSarifFiles) {
|
||||
injectLinesOfCode(sarifFile, language, linesOfCode);
|
||||
}
|
||||
@@ -245,17 +253,17 @@ export async function runQueries(
|
||||
|
||||
const sarifFile = path.join(destinationFolder, `${language}-${type}.sarif`);
|
||||
|
||||
const codeql = 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}"`
|
||||
|
||||
Reference in New Issue
Block a user