Skip to content

Commit 24472d8

Browse files
bergmeisterChristoph Bergmeister
and
Christoph Bergmeister
authoredJul 30, 2020
Expose new rule PSAvoidUsingDoubleQuotesForConstantString added in PSSA 1.19.1 (#1333)
Co-authored-by: Christoph Bergmeister <[email protected]>
1 parent bd4c8b1 commit 24472d8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
 

‎modules.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"PSScriptAnalyzer":{
3-
"MinimumVersion":"1.19.0",
3+
"MinimumVersion":"1.19.1",
44
"MaximumVersion":"1.99"
55
},
66
"Plaster":{

‎src/PowerShellEditorServices/Services/Workspace/LanguageServerSettings.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ public CodeFormattingSettings(CodeFormattingSettings codeFormattingSettings)
216216

217217
public bool AddWhitespaceAroundPipe { get; set; }
218218
public bool AutoCorrectAliases { get; set; }
219+
public bool UseConstantStrings { get; set; }
219220
public CodeFormattingPreset Preset { get; set; }
220221
public bool OpenBraceOnSameLine { get; set; }
221222
public bool NewLineAfterOpenBrace { get; set; }
@@ -315,6 +316,9 @@ private Hashtable GetCustomPSSASettingsHashtable(int tabSize, bool insertSpaces)
315316
{ "PSUseCorrectCasing", new Hashtable {
316317
{ "Enable", UseCorrectCasing }
317318
}},
319+
{ "PSAvoidUsingDoubleQuotesForConstantString", new Hashtable {
320+
{ "Enable", UseConstantStrings }
321+
}},
318322
};
319323

320324
if (AutoCorrectAliases)
@@ -331,7 +335,8 @@ private Hashtable GetCustomPSSASettingsHashtable(int tabSize, bool insertSpaces)
331335
"PSPlaceOpenBrace",
332336
"PSUseConsistentWhitespace",
333337
"PSUseConsistentIndentation",
334-
"PSAlignAssignmentStatement"
338+
"PSAlignAssignmentStatement",
339+
"PSAvoidUsingDoubleQuotesForConstantString",
335340
}},
336341
{
337342
"Rules", ruleConfigurations

0 commit comments

Comments
 (0)
Please sign in to comment.