Skip to content

PSScriptAnalyzer has warnings #15

Closed
@jwittner

Description

@jwittner

Running Invoke-ScriptAnalyzer UnitySetup\UnitySetup.psm1 results in

RuleName                            Severity     ScriptName Line  Message
--------                            --------     ---------- ----  -------
PSUseShouldProcessForStateChangingF Warning      UnitySetup 492   Function ’Start-UnityEditor’ has verb that could change
unctions                                         .psm1            system state. Therefore, the function has to support
                                                                  'ShouldProcess'.
PSAvoidUsingWriteHost               Warning      UnitySetup 303   File 'UnitySetup.psm1' uses Write-Host. Avoid using
                                                 .psm1            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.
PSAvoidUsingWriteHost               Warning      UnitySetup 309   File 'UnitySetup.psm1' uses Write-Host. Avoid using
                                                 .psm1            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.
PSAvoidUsingWriteHost               Warning      UnitySetup 314   File 'UnitySetup.psm1' uses Write-Host. Avoid using
                                                 .psm1            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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions