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

Cleanup #172

Merged
merged 2 commits into from
Jan 4, 2025
Merged

Cleanup #172

merged 2 commits into from
Jan 4, 2025

Conversation

mikeee
Copy link
Owner

@mikeee mikeee commented Jan 4, 2025

  • Does this PR meet the requirements:
  • The commit messages are appropriate
  • This has been tested as far as practicable to ensure intended functionality is fine
  • What kind of change does this PR introduce? (Bug/issue fix, new package, documentation update, etc...)

  • What does this PR accomplish? (Links to issues are acceptable)

  • Does this PR introduce a breaking change or require work elsewhere?

  • Other context/information:

mikeee added 2 commits January 4, 2025 18:13
Signed-off-by: Mike Nguyen <hey@mike.ee>
Signed-off-by: Mike Nguyen <hey@mike.ee>
Copy link

github-actions bot commented Jan 4, 2025

PSScriptAnalyzer results:

Errors: [0], Warnings: [27], Information: [5]


RuleName   : PSAvoidGlobalVars
Severity   : Warning
ScriptName : update_all.ps1
Line       : 112
Message    : Found global variable 'global:au_Root'.

RuleName   : PSAvoidGlobalVars
Severity   : Warning
ScriptName : update_all.ps1
Line       : 113
Message    : Found global variable 'global:info'.

RuleName   : PSAvoidUsingWriteHost
Severity   : Warning
ScriptName : update_all.ps1
Line       : 111
Message    : File 'update_all.ps1' 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.

RuleName   : PSAvoidGlobalVars
Severity   : Warning
ScriptName : test_all.ps1
Line       : 6
Message    : Found global variable 'global:au_root'.

RuleName   : PSAvoidGlobalVars
Severity   : Warning
ScriptName : test_all.ps1
Line       : 76
Message    : Found global variable 'global:info'.

RuleName   : PSAvoidUsingWriteHost
Severity   : Warning
ScriptName : test_all.ps1
Line       : 13
Message    : File 'test_all.ps1' 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.

RuleName   : PSAvoidUsingWriteHost
Severity   : Warning
ScriptName : test_all.ps1
Line       : 18
Message    : File 'test_all.ps1' 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.

RuleName   : PSAvoidUsingWriteHost
Severity   : Warning
ScriptName : test_all.ps1
Line       : 19
Message    : File 'test_all.ps1' 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.

RuleName   : PSAvoidUsingWriteHost
Severity   : Warning
ScriptName : Set-DescriptionFromReadme.ps1
Line       : 23
Message    : File 'Set-DescriptionFromReadme.ps1' 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.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : Set-DescriptionFromReadme.ps1
Line       : 20
Message    : Function 'Set-DescriptionFromReadme' has verb that could change 
             system state. Therefore, the function has to support 
             'ShouldProcess'.

RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : Get-GitHubRelease.ps1
Line       : 28
Message    : The parameter 'Latest' has been declared but not used. 

RuleName   : PSUseDeclaredVarsMoreThanAssignments
Severity   : Warning
ScriptName : update.ps1
Line       : 30
Message    : The variable 'matched' is assigned but never used.

RuleName   : PSUseDeclaredVarsMoreThanAssignments
Severity   : Warning
ScriptName : update.ps1
Line       : 32
Message    : The variable 'versionMajor' is assigned but never used.

RuleName   : PSAvoidUsingWriteHost
Severity   : Warning
ScriptName : chocolateyBeforeModify.ps1
Line       : 3
Message    : File 'chocolateyBeforeModify.ps1' 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.

RuleName   : PSAvoidUsingWMICmdlet
Severity   : Warning
ScriptName : chocolateyInstall.ps1
Line       : 15
Message    : File 'chocolateyInstall.ps1' uses WMI cmdlet. For PowerShell 3.0 
             and above, use CIM cmdlet which perform the same tasks as the WMI 
             cmdlets. The CIM cmdlets comply with WS-Management (WSMan) 
             standards and with the Common Information Model (CIM) standard, 
             which enables the cmdlets to use the same techniques to manage 
             Windows computers and those running other operating systems.

RuleName   : PSAvoidUsingCmdletAliases
Severity   : Warning
ScriptName : chocolateyInstall.ps1
Line       : 15
Message    : 'select' is an alias of 'Select-Object'. Alias can introduce 
             possible problems and make scripts hard to maintain. Please 
             consider changing alias to its full content.

RuleName   : PSUseDeclaredVarsMoreThanAssignments
Severity   : Warning
ScriptName : update.ps1
Line       : 30
Message    : The variable 'matched' is assigned but never used.

RuleName   : PSUseDeclaredVarsMoreThanAssignments
Severity   : Warning
ScriptName : update.ps1
Line       : 32
Message    : The variable 'versionMajor' is assigned but never used.

RuleName   : PSAvoidUsingWriteHost
Severity   : Warning
ScriptName : chocolateyUninstall.ps1
Line       : 11
Message    : File 'chocolateyUninstall.ps1' 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.

RuleName   : PSAvoidUsingWriteHost
Severity   : Warning
ScriptName : chocolateyUninstall.ps1
Line       : 12
Message    : File 'chocolateyUninstall.ps1' 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.

RuleName   : PSAvoidUsingWriteHost
Severity   : Warning
ScriptName : chocolateyUninstall.ps1
Line       : 11
Message    : File 'chocolateyUninstall.ps1' 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.

RuleName   : PSAvoidUsingWriteHost
Severity   : Warning
ScriptName : chocolateyUninstall.ps1
Line       : 12
Message    : File 'chocolateyUninstall.ps1' 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.

RuleName   : PSAvoidUsingWriteHost
Severity   : Warning
ScriptName : chocolateyUninstall.ps1
Line       : 10
Message    : File 'chocolateyUninstall.ps1' 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.

RuleName   : PSAvoidUsingWriteHost
Severity   : Warning
ScriptName : chocolateyUninstall.ps1
Line       : 11
Message    : File 'chocolateyUninstall.ps1' 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.

RuleName   : PSAvoidUsingWriteHost
Severity   : Warning
ScriptName : chocolateyUninstall.ps1
Line       : 11
Message    : File 'chocolateyUninstall.ps1' 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.

RuleName   : PSAvoidUsingWriteHost
Severity   : Warning
ScriptName : chocolateyUninstall.ps1
Line       : 12
Message    : File 'chocolateyUninstall.ps1' 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.

RuleName   : PSAvoidUsingWMICmdlet
Severity   : Warning
ScriptName : chocolateyUninstall.ps1
Line       : 5
Message    : File 'chocolateyUninstall.ps1' uses WMI cmdlet. For PowerShell 3.0 
             and above, use CIM cmdlet which perform the same tasks as the WMI 
             cmdlets. The CIM cmdlets comply with WS-Management (WSMan) 
             standards and with the Common Information Model (CIM) standard, 
             which enables the cmdlets to use the same techniques to manage 
             Windows computers and those running other operating systems.

RuleName   : PSAvoidTrailingWhitespace
Severity   : Information
ScriptName : update.ps1
Line       : 33
Message    : Line has trailing whitespace

RuleName   : PSAvoidTrailingWhitespace
Severity   : Information
ScriptName : update.ps1
Line       : 8
Message    : Line has trailing whitespace

RuleName   : PSAvoidTrailingWhitespace
Severity   : Information
ScriptName : update.ps1
Line       : 46
Message    : Line has trailing whitespace

RuleName   : PSAvoidTrailingWhitespace
Severity   : Information
ScriptName : update.ps1
Line       : 36
Message    : Line has trailing whitespace

RuleName   : PSAvoidTrailingWhitespace
Severity   : Information
ScriptName : update.ps1
Line       : 39
Message    : Line has trailing whitespace

@mikeee mikeee merged commit 2beebf8 into master Jan 4, 2025
3 checks passed
@mikeee mikeee deleted the cleanup branch January 4, 2025 21:15
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

Successfully merging this pull request may close these issues.

1 participant