Skip to content

Commit 1cda9d3

Browse files
alexandearJamesWTruher
authored andcommitted
Use the typewriter apostrophe ( ' ) instead the typographic apostrophe ( ’ ) in rules message (#855)
All rules use the typewriter apostrophe in the description.
1 parent 9e37dd3 commit 1cda9d3

5 files changed

+7
-7
lines changed

Rules/Strings.Designer.cs

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Rules/Strings.resx

+2-2
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@
280280
<value>It is a best practice to emit informative, verbose messages in DSC resource functions. This helps in debugging issues when a DSC configuration is executed.</value>
281281
</data>
282282
<data name="UseVerboseMessageInDSCResourceErrorFunction" xml:space="preserve">
283-
<value>There is no call to Write-Verbose in DSC function {0}. If you are using Write-Verbose in a helper function, suppress this rule application.</value>
283+
<value>There is no call to Write-Verbose in DSC function '{0}'. If you are using Write-Verbose in a helper function, suppress this rule application.</value>
284284
</data>
285285
<data name="UseVerboseMessageInDSCResourceCommonName" xml:space="preserve">
286286
<value>Use verbose message in DSC resource</value>
@@ -658,7 +658,7 @@
658658
<value>Functions that have verbs like New, Start, Stop, Set, Reset, Restart that change system state should support 'ShouldProcess'.</value>
659659
</data>
660660
<data name="UseShouldProcessForStateChangingFunctionsError" xml:space="preserve">
661-
<value>Function {0} has verb that could change system state. Therefore, the function has to support 'ShouldProcess'.</value>
661+
<value>Function '{0}' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'.</value>
662662
</data>
663663
<data name="UseShouldProcessForStateChangingFunctionsName" xml:space="preserve">
664664
<value>UseShouldProcessForStateChangingFunctions</value>

Tests/DisabledRules/ProvideVerboseMessage.tests.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Import-Module PSScriptAnalyzer
2-
$violationMessage = [regex]::Escape("There is no call to Write-Verbose in the function Verb-Files.")
2+
$violationMessage = [regex]::Escape("There is no call to Write-Verbose in the function 'Verb-Files'.")
33
$violationName = "PSProvideVerboseMessage"
44
$directory = Split-Path -Parent $MyInvocation.MyCommand.Path
55
$violations = Invoke-ScriptAnalyzer $directory\BadCmdlet.ps1 | Where-Object {$_.RuleName -eq $violationName}

Tests/Rules/UseShouldProcessForStateChangingFunctions.tests.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Import-Module PSScriptAnalyzer
2-
$violationMessage = "Function Set-MyObject has verb that could change system state. Therefore, the function has to support 'ShouldProcess'"
2+
$violationMessage = "Function 'Set-MyObject' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'"
33
$violationName = "PSUseShouldProcessForStateChangingFunctions"
44
$directory = Split-Path -Parent $MyInvocation.MyCommand.Path
55
$violations = Invoke-ScriptAnalyzer $directory\UseShouldProcessForStateChangingFunctions.ps1 | Where-Object {$_.RuleName -eq $violationName}

Tests/Rules/UseVerboseMessageInDSCResource.Tests.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Import-Module PSScriptAnalyzer
22

3-
$violationMessage = "There is no call to Write-Verbose in DSC function Test-TargetResource. If you are using Write-Verbose in a helper function, suppress this rule application."
3+
$violationMessage = "There is no call to Write-Verbose in DSC function 'Test-TargetResource'. If you are using Write-Verbose in a helper function, suppress this rule application."
44
$violationName = "PSDSCUseVerboseMessageInDSCResource"
55
$directory = Split-Path -Parent $MyInvocation.MyCommand.Path
66
$violations = Invoke-ScriptAnalyzer $directory\DSCResourceModule\DSCResources\MSFT_WaitForAll\MSFT_WaitForAll.psm1 | Where-Object {$_.RuleName -eq $violationName}

0 commit comments

Comments
 (0)