Skip to content

Commit c8b0b1c

Browse files
committed
Use parent setting for "Create Query" config
1 parent 62597f1 commit c8b0b1c

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

extensions/ql-vscode/src/config.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -620,13 +620,15 @@ export function allowHttp(): boolean {
620620
return ALLOW_HTTP_SETTING.getValue<boolean>() || false;
621621
}
622622

623+
/**
624+
* Parent setting for all settings related to the "Create Query" command.
625+
*/
626+
const CREATE_QUERY_COMMAND = new Setting("createQuery", ROOT_SETTING);
627+
623628
/**
624629
* The name of the folder where we want to create QL packs.
625630
**/
626-
const QL_PACK_LOCATION = new Setting(
627-
"qlPackLocation",
628-
new Setting("createQuery", ROOT_SETTING),
629-
);
631+
const QL_PACK_LOCATION = new Setting("qlPackLocation", CREATE_QUERY_COMMAND);
630632

631633
export function getQlPackLocation(): string | undefined {
632634
return QL_PACK_LOCATION.getValue<string>() || undefined;
@@ -641,7 +643,7 @@ export async function setQlPackLocation(folder: string | undefined) {
641643
**/
642644
const AUTOGENERATE_QL_PACKS = new Setting(
643645
"autogenerateQlPacks",
644-
new Setting("createQuery", ROOT_SETTING),
646+
CREATE_QUERY_COMMAND,
645647
);
646648

647649
export function getAutogenerateQlPacks(): string | undefined {

0 commit comments

Comments
 (0)