Skip to content

Commit f5304e7

Browse files
committed
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.
1 parent 1764e3d commit f5304e7

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/codeql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,7 @@ async function generateCodeScanningConfig(
12661266
}
12671267

12681268
augmentedConfig["query-filters"] = [
1269-
...(config.augmentationProperties.defaultQueryFilters || []),
1269+
...(config.augmentationProperties.extraQueryExclusions || []),
12701270
...(augmentedConfig["query-filters"] || []),
12711271
];
12721272
if (augmentedConfig["query-filters"]?.length === 0) {

src/config-utils.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ export interface AugmentationProperties {
186186
packsInput?: string[];
187187

188188
/**
189-
* Default query filters to apply to the queries in the config.
189+
* Extra query exclusions to append to the config.
190190
*/
191-
defaultQueryFilters?: QueryFilter[];
191+
extraQueryExclusions?: ExcludeQueryFilter[];
192192
}
193193

194194
/**
@@ -201,7 +201,7 @@ export const defaultAugmentationProperties: AugmentationProperties = {
201201
packsInput: undefined,
202202
queriesInput: undefined,
203203
qualityQueriesInput: undefined,
204-
defaultQueryFilters: [],
204+
extraQueryExclusions: [],
205205
};
206206
export type Packs = Partial<Record<Language, string[]>>;
207207

@@ -671,9 +671,11 @@ export async function calculateAugmentation(
671671
false,
672672
);
673673

674-
const defaultQueryFilters: QueryFilter[] = [];
674+
const extraQueryExclusions: ExcludeQueryFilter[] = [];
675675
if (await shouldPerformDiffInformedAnalysis(codeql, features, logger)) {
676-
defaultQueryFilters.push({ exclude: { tags: "exclude-from-incremental" } });
676+
extraQueryExclusions.push({
677+
exclude: { tags: "exclude-from-incremental" },
678+
});
677679
}
678680

679681
return {
@@ -682,7 +684,7 @@ export async function calculateAugmentation(
682684
queriesInput,
683685
queriesInputCombines,
684686
qualityQueriesInput,
685-
defaultQueryFilters,
687+
extraQueryExclusions,
686688
};
687689
}
688690

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy