Skip to content

Commit 06d4972

Browse files
committed
Merge pull request #349 from juneb/development
Edited WriteHost rule strings.
2 parents 3864fa1 + 8e6bf17 commit 06d4972

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Rules/Strings.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Rules/Strings.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,10 @@
361361
<value>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.</value>
362362
</data>
363363
<data name="AvoidUsingWriteHostDescription" xml:space="preserve">
364-
<value>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.</value>
364+
<value>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.</value>
365365
</data>
366366
<data name="AvoidUsingWriteHostError" xml:space="preserve">
367-
<value>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.</value>
367+
<value>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.</value>
368368
</data>
369369
<data name="AvoidUsingWriteHostCommonName" xml:space="preserve">
370370
<value>Avoid Using Write-Host</value>

0 commit comments

Comments
 (0)