diff --git a/modules.json b/modules.json index cb9076b20..d85819e6c 100644 --- a/modules.json +++ b/modules.json @@ -1,6 +1,6 @@ { "PSScriptAnalyzer":{ - "MinimumVersion":"1.19.0", + "MinimumVersion":"1.19.1", "MaximumVersion":"1.99" }, "Plaster":{ diff --git a/src/PowerShellEditorServices/Services/Workspace/LanguageServerSettings.cs b/src/PowerShellEditorServices/Services/Workspace/LanguageServerSettings.cs index 2e2441619..627e4f57a 100644 --- a/src/PowerShellEditorServices/Services/Workspace/LanguageServerSettings.cs +++ b/src/PowerShellEditorServices/Services/Workspace/LanguageServerSettings.cs @@ -216,6 +216,7 @@ public CodeFormattingSettings(CodeFormattingSettings codeFormattingSettings) public bool AddWhitespaceAroundPipe { get; set; } public bool AutoCorrectAliases { get; set; } + public bool UseConstantStrings { get; set; } public CodeFormattingPreset Preset { get; set; } public bool OpenBraceOnSameLine { get; set; } public bool NewLineAfterOpenBrace { get; set; } @@ -315,6 +316,9 @@ private Hashtable GetCustomPSSASettingsHashtable(int tabSize, bool insertSpaces) { "PSUseCorrectCasing", new Hashtable { { "Enable", UseCorrectCasing } }}, + { "PSAvoidUsingDoubleQuotesForConstantString", new Hashtable { + { "Enable", UseConstantStrings } + }}, }; if (AutoCorrectAliases) @@ -331,7 +335,8 @@ private Hashtable GetCustomPSSASettingsHashtable(int tabSize, bool insertSpaces) "PSPlaceOpenBrace", "PSUseConsistentWhitespace", "PSUseConsistentIndentation", - "PSAlignAssignmentStatement" + "PSAlignAssignmentStatement", + "PSAvoidUsingDoubleQuotesForConstantString", }}, { "Rules", ruleConfigurations