Use include instructions for suite file
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
const SARIF_RESULTS_QUERY_KINDS = [
|
export const SARIF_RESULTS_QUERY_KINDS = [
|
||||||
"problem",
|
"problem",
|
||||||
"alert",
|
"alert",
|
||||||
"path-problem",
|
"path-problem",
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import type { CodeQLCliServer } from "../codeql-cli/cli";
|
|||||||
import type { QlPackDetails } from "./ql-pack-details";
|
import type { QlPackDetails } from "./ql-pack-details";
|
||||||
import { getQlPackFilePath } from "../common/ql";
|
import { getQlPackFilePath } from "../common/ql";
|
||||||
import type { SuiteInstruction } from "../packaging/suite-instruction";
|
import type { SuiteInstruction } from "../packaging/suite-instruction";
|
||||||
|
import { SARIF_RESULTS_QUERY_KINDS } from "../common/query-metadata";
|
||||||
|
|
||||||
export async function resolveCodeScanningQueryPack(
|
export async function resolveCodeScanningQueryPack(
|
||||||
logger: BaseLogger,
|
logger: BaseLogger,
|
||||||
@@ -34,10 +35,15 @@ export async function resolveCodeScanningQueryPack(
|
|||||||
import: `codeql-suites/${language}-code-scanning.qls`,
|
import: `codeql-suites/${language}-code-scanning.qls`,
|
||||||
from: `${downloadedPack.name}@${downloadedPack.version}`,
|
from: `${downloadedPack.name}@${downloadedPack.version}`,
|
||||||
},
|
},
|
||||||
// Exclude any non-problem queries
|
|
||||||
{
|
{
|
||||||
exclude: {
|
// This is necessary to ensure that the next import filter
|
||||||
kind: ["diagnostic", "metric"],
|
// is applied correctly
|
||||||
|
exclude: {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Only include problem queries
|
||||||
|
include: {
|
||||||
|
kind: SARIF_RESULTS_QUERY_KINDS,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user