From 8e6bf17c94ce363df9655ffcbf279c6dd0dde3c5 Mon Sep 17 00:00:00 2001 From: June Blender Date: Fri, 6 Nov 2015 14:15:34 -0800 Subject: [PATCH] Edited WriteHost rule strings. --- Rules/Strings.Designer.cs | 4 ++-- Rules/Strings.resx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Rules/Strings.Designer.cs b/Rules/Strings.Designer.cs index b49545e74..99e681f14 100644 --- a/Rules/Strings.Designer.cs +++ b/Rules/Strings.Designer.cs @@ -790,7 +790,7 @@ internal static string AvoidUsingWriteHostCommonName { } /// - /// Looks up a localized string similar to Write-Host or Console.Write should not be used because it may not work in some hosts or there may even be no hosts at all. Use Write-Output instead.. + /// Looks up a localized string similar to Avoid using the Write-Host cmdlet. Instead, use Write-Output, Write-Verbose, or Write-Information. Because Write-Host is host-specific, its implementation might vary unpredictably. Also, prior to PowerShell 5.0, Write-Host did not write to a stream, so users cannot suppress it, capture its value, or redirect it.. /// internal static string AvoidUsingWriteHostDescription { get { @@ -799,7 +799,7 @@ internal static string AvoidUsingWriteHostDescription { } /// - /// Looks up a localized string similar to File '{0}' uses Write-Host. This is not recommended because it may not work in some hosts or there may even be no hosts at all. Use Write-Output instead.. + /// Looks up a localized string similar to File '{0}' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.. /// internal static string AvoidUsingWriteHostError { get { diff --git a/Rules/Strings.resx b/Rules/Strings.resx index c5b254de5..4657658df 100644 --- a/Rules/Strings.resx +++ b/Rules/Strings.resx @@ -361,10 +361,10 @@ File '{0}' uses Console.'{1}'. Using Console to write is not recommended because it may not work in all hosts or there may even be no hosts at all. Use Write-Output instead. - Write-Host or Console.Write should not be used because it may not work in some hosts or there may even be no hosts at all. Use Write-Output instead. + Avoid using the Write-Host cmdlet. Instead, use Write-Output, Write-Verbose, or Write-Information. Because Write-Host is host-specific, its implementation might vary unpredictably. Also, prior to PowerShell 5.0, Write-Host did not write to a stream, so users cannot suppress it, capture its value, or redirect it. - File '{0}' uses Write-Host. This is not recommended because it may not work in some hosts or there may even be no hosts at all. Use Write-Output instead. + File '{0}' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Avoid Using Write-Host