Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install.ps1 fails PSScriptAnalyzer default rules #55

Open
jayvdb opened this issue Jun 21, 2019 · 0 comments
Open

install.ps1 fails PSScriptAnalyzer default rules #55

jayvdb opened this issue Jun 21, 2019 · 0 comments

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Jun 21, 2019

Drop in solutions should pass lint rules. Especially for PS1, as the most common linter doesnt have the option for excluding individual files PowerShell/PSScriptAnalyzer#1230

Switching to Python is another solution for this #29

PS> Invoke-ScriptAnalyzer ./appveyor/install.ps1

RuleName                            Severity     ScriptName Line  Message
--------                            --------     ---------- ----  -------
PSAvoidUsingWriteHost               Warning      install.ps 27    File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 32    File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 44    File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 105   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 107   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 117   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 125   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 127   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 145   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 152   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 161   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 164   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 167   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 185   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 187   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 196   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 199   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 202   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 204   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 215   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 217   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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      install.ps 220   File 'install.ps1' uses Write-Host. Avoid using Write-Host
                                                 1                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.
PSAvoidUsingPositionalParameters    Information  install.ps 32    Cmdlet 'Write-Host' has positional parameter. Please use
                                                 1                named parameters instead of positional parameters when
                                                                  calling a command.
PSAvoidUsingPositionalParameters    Information  install.ps 105   Cmdlet 'Write-Host' has positional parameter. Please use
                                                 1                named parameters instead of positional parameters when
                                                                  calling a command.
PSAvoidUsingPositionalParameters    Information  install.ps 120   Cmdlet 'InstallPythonMSI' has positional parameter. Please
                                                 1                use named parameters instead of positional parameters when
                                                                  calling a command.
PSAvoidUsingPositionalParameters    Information  install.ps 122   Cmdlet 'InstallPythonEXE' has positional parameter. Please
                                                 1                use named parameters instead of positional parameters when
                                                                  calling a command.
PSAvoidUsingPositionalParameters    Information  install.ps 164   Cmdlet 'Write-Host' has positional parameter. Please use
                                                 1                named parameters instead of positional parameters when
                                                                  calling a command.
PSAvoidUsingPositionalParameters    Information  install.ps 185   Cmdlet 'Write-Host' has positional parameter. Please use
                                                 1                named parameters instead of positional parameters when
                                                                  calling a command.
PSAvoidUsingPositionalParameters    Information  install.ps 196   Cmdlet 'Write-Host' has positional parameter. Please use
                                                 1                named parameters instead of positional parameters when
                                                                  calling a command.
PSAvoidUsingPositionalParameters    Information  install.ps 225   Cmdlet 'InstallPython' has positional parameter. Please use
                                                 1                named parameters instead of positional parameters when
                                                                  calling a command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant