mirror of
https://github.com/github/codeql-action.git
synced 2026-01-04 13:40:23 +08:00
Don't download packs when it isn't needed
This commit is contained in:
@@ -6,6 +6,7 @@ import * as yaml from "js-yaml";
|
||||
|
||||
import * as analysisPaths from "./analysis-paths";
|
||||
import {
|
||||
CODEQL_VERSION_CONFIG_FILES,
|
||||
CODEQL_VERSION_COUNTS_LINES,
|
||||
CODEQL_VERSION_NEW_TRACING,
|
||||
getCodeQL,
|
||||
@@ -235,12 +236,15 @@ export async function runQueries(
|
||||
);
|
||||
}
|
||||
|
||||
const codeql = await getCodeQL(config.codeQLCmd);
|
||||
try {
|
||||
if (hasPackWithCustomQueries) {
|
||||
if (
|
||||
hasPackWithCustomQueries &&
|
||||
!(await util.codeQlVersionAbove(codeql, CODEQL_VERSION_CONFIG_FILES))
|
||||
) {
|
||||
logger.info("Performing analysis with custom CodeQL Packs.");
|
||||
logger.startGroup(`Downloading custom packs for ${language}`);
|
||||
|
||||
const codeql = await getCodeQL(config.codeQLCmd);
|
||||
const results = await codeql.packDownload(packsWithVersion);
|
||||
logger.info(
|
||||
`Downloaded packs: ${results.packs
|
||||
|
||||
@@ -220,7 +220,7 @@ const CODEQL_VERSION_GROUP_RULES = "2.5.5";
|
||||
const CODEQL_VERSION_SARIF_GROUP = "2.5.3";
|
||||
export const CODEQL_VERSION_COUNTS_LINES = "2.6.2";
|
||||
const CODEQL_VERSION_CUSTOM_QUERY_HELP = "2.7.1";
|
||||
const CODEQL_VERSION_CONFIG_FILES = "2.8.2"; // Versions before 2.8.2 weren't tolerant to unknown properties
|
||||
export const CODEQL_VERSION_CONFIG_FILES = "2.8.2"; // Versions before 2.8.2 weren't tolerant to unknown properties
|
||||
export const CODEQL_VERSION_ML_POWERED_QUERIES = "2.7.5";
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user