mirror of
https://github.com/github/codeql-action.git
synced 2026-10-31 09:59:43 +00:00
Rename defaultQueryFilters
This commit renames AugmentationProperties.defaultQueryFilters to extraQueryExclusions, and changes its type to ExcludeQueryFilter[]. It matters whether we are adding query inclusions or exclusions, and this renaming makes that distinction clearer.
This commit is contained in:
@@ -1266,7 +1266,7 @@ async function generateCodeScanningConfig(
|
||||
}
|
||||
|
||||
augmentedConfig["query-filters"] = [
|
||||
...(config.augmentationProperties.defaultQueryFilters || []),
|
||||
...(config.augmentationProperties.extraQueryExclusions || []),
|
||||
...(augmentedConfig["query-filters"] || []),
|
||||
];
|
||||
if (augmentedConfig["query-filters"]?.length === 0) {
|
||||
|
||||
@@ -186,9 +186,9 @@ export interface AugmentationProperties {
|
||||
packsInput?: string[];
|
||||
|
||||
/**
|
||||
* Default query filters to apply to the queries in the config.
|
||||
* Extra query exclusions to append to the config.
|
||||
*/
|
||||
defaultQueryFilters?: QueryFilter[];
|
||||
extraQueryExclusions?: ExcludeQueryFilter[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -201,7 +201,7 @@ export const defaultAugmentationProperties: AugmentationProperties = {
|
||||
packsInput: undefined,
|
||||
queriesInput: undefined,
|
||||
qualityQueriesInput: undefined,
|
||||
defaultQueryFilters: [],
|
||||
extraQueryExclusions: [],
|
||||
};
|
||||
export type Packs = Partial<Record<Language, string[]>>;
|
||||
|
||||
@@ -671,9 +671,11 @@ export async function calculateAugmentation(
|
||||
false,
|
||||
);
|
||||
|
||||
const defaultQueryFilters: QueryFilter[] = [];
|
||||
const extraQueryExclusions: ExcludeQueryFilter[] = [];
|
||||
if (await shouldPerformDiffInformedAnalysis(codeql, features, logger)) {
|
||||
defaultQueryFilters.push({ exclude: { tags: "exclude-from-incremental" } });
|
||||
extraQueryExclusions.push({
|
||||
exclude: { tags: "exclude-from-incremental" },
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -682,7 +684,7 @@ export async function calculateAugmentation(
|
||||
queriesInput,
|
||||
queriesInputCombines,
|
||||
qualityQueriesInput,
|
||||
defaultQueryFilters,
|
||||
extraQueryExclusions,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user