From 1374fcd0ed41b72bd97cf963cf1b9d9ae2a02d98 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 23 Jul 2020 21:47:32 +0100 Subject: [PATCH] Expose new formatter setting powershell.codeFormatting.useConstantStrings (disabled by default) for new rule AvoidUsingDoubleQuotesForConstantString (disabled by default) added in PSSA 1.19.1 --- package.json | 5 +++++ src/settings.ts | 2 ++ 2 files changed, 7 insertions(+) diff --git a/package.json b/package.json index b903535ed5..7421557a1f 100644 --- a/package.json +++ b/package.json @@ -821,6 +821,11 @@ "default": true, "description": "Align assignment statements in a hashtable or a DSC Configuration." }, + "powershell.codeFormatting.useConstantStrings": { + "type": "boolean", + "default": false, + "description": "Use single quotes if a string is not interpolated and its value does not contain a single quote." + }, "powershell.codeFormatting.useCorrectCasing": { "type": "boolean", "default": false, diff --git a/src/settings.ts b/src/settings.ts index 6271eb1274..35922fcacd 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -58,6 +58,7 @@ export interface ICodeFormattingSettings { trimWhitespaceAroundPipe: boolean; ignoreOneLineBlock: boolean; alignPropertyValuePairs: boolean; + useConstantStrings: boolean; useCorrectCasing: boolean; } @@ -185,6 +186,7 @@ export function load(): ISettings { trimWhitespaceAroundPipe: false, ignoreOneLineBlock: true, alignPropertyValuePairs: true, + useConstantStrings: false, useCorrectCasing: false, };