mirror of
https://github.com/github/codeql-action.git
synced 2026-05-04 12:50:14 +00:00
Test
This commit is contained in:
+15
-11
@@ -233,17 +233,21 @@ function getCodeQLForCmd(cmd: string): CodeQL {
|
||||
return JSON.parse(output);
|
||||
},
|
||||
databaseAnalyze: async function(databasePath: string, sarifFile: string, querySuite: string) {
|
||||
await exec.exec(cmd, [
|
||||
'database',
|
||||
'analyze',
|
||||
util.getMemoryFlag(),
|
||||
util.getThreadsFlag(),
|
||||
databasePath,
|
||||
'--format=sarif-latest',
|
||||
'--output=' + sarifFile,
|
||||
'--no-sarif-add-snippets',
|
||||
querySuite
|
||||
]);
|
||||
try {
|
||||
await exec.exec(cmd, [
|
||||
'database',
|
||||
'analyze',
|
||||
util.getMemoryFlag(),
|
||||
util.getThreadsFlag(),
|
||||
databasePath,
|
||||
'--format=sarif-latest',
|
||||
'--output=' + sarifFile,
|
||||
'--no-sarif-add-snippets',
|
||||
querySuite
|
||||
]);
|
||||
} catch (error) {
|
||||
throw new Error ("Got it!" + error.message)
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
+1
-2
@@ -131,7 +131,7 @@ async function runQueries(databaseFolder: string, sarifFolder: string, config: c
|
||||
try {
|
||||
await codeql.databaseAnalyze(path.join(databaseFolder, database), sarifFile, querySuite);
|
||||
} catch (analysisError) {
|
||||
core.debug(analysisError.message);
|
||||
core.debug("test test test" + analysisError.message);
|
||||
if (analysisError.message.contains("exit code 32")) {
|
||||
throw new Error('Unable to analyze ' + database + ' because CodeQL was unable to detect any code for that language. \n [Learn more](https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-code-scanning) about how to troubleshoot this error. ');
|
||||
} else {
|
||||
@@ -175,7 +175,6 @@ async function run() {
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
core.debug(error.message);
|
||||
core.setFailed(error.message);
|
||||
await util.reportActionFailed('finish', error.message, error.stack);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user