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

Process block incorrectly flagged as error/alias of Get-Process #3527

Closed
4 tasks done
1sttec opened this issue Aug 25, 2021 · 2 comments
Closed
4 tasks done

Process block incorrectly flagged as error/alias of Get-Process #3527

1sttec opened this issue Aug 25, 2021 · 2 comments
Labels
Area-Script Analysis Issue-Bug A bug to squash. Needs: Fix Verification Please verify the fix for us! Resolution-Duplicate Will close automatically.

Comments

@1sttec
Copy link

1sttec commented Aug 25, 2021

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.

Summary

Getting warning

'Process' is implicitly aliasing 'Get-Process' because it is missing the 'Get-' prefix. This can introduce possible problems and make scripts hard to maintain. Please consider changing command to its full name

While using Process{ block

PowerShell Version

Name                           Value
----                           -----
PSVersion                      5.1.18362.1593
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.18362.1593
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Visual Studio Code Version

1.59.1
3866c3553be8b268c8a7f8c0482c0c0177aa8bfa
x64

Extension Version

Steps to Reproduce

Open a ps1 file with a Begin{ and Process{ block and allow validation to flag errors; see attached.

Visuals

image001

Logs

No response

@1sttec 1sttec added the Issue-Bug A bug to squash. label Aug 25, 2021
@ghost ghost added the Needs: Triage Maintainer attention needed! label Aug 25, 2021
@rjmholt
Copy link
Contributor

rjmholt commented Aug 25, 2021

Duplicate of PowerShell/PSScriptAnalyzer#1571

@rjmholt rjmholt marked this as a duplicate of PowerShell/PSScriptAnalyzer#1571 Aug 25, 2021
@rjmholt rjmholt closed this as completed Aug 25, 2021
@rjmholt rjmholt added Resolution-Duplicate Will close automatically. and removed Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed! labels Aug 25, 2021
@andyleejordan
Copy link
Member

Hi @1sttec, the latest release of the extension comes with PSScriptAnalyzer v1.20.0, which should no longer erroneously highlight a process block as an error like this. Can you verify for us? Thanks!

@PowerShell PowerShell deleted a comment Sep 13, 2021
@andyleejordan andyleejordan added Issue-Bug A bug to squash. Needs: Fix Verification Please verify the fix for us! Area-Script Analysis labels Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Script Analysis Issue-Bug A bug to squash. Needs: Fix Verification Please verify the fix for us! Resolution-Duplicate Will close automatically.
Projects
None yet
Development

No branches or pull requests

3 participants