Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix false positive of AvoidAlias rule for implicit aliasing of Get- commands for the CommandType ExternalScript#1386

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@bergmeister
Copy link
Collaborator

PR Summary

Fixes#1369
Unfortunately this issue could only be reproduced when PSSA is hosted within PSES where the root of the workspace becomes the working directory of the runspace pool, which causesGet-Command ..\PathToScript.ps1 to return a command type of ExternalScript, which then makes it into the command cache and causes the false positve.
The fix is to search only for cmdlets/functions where the implicitGet- aliasing applies.

PR Checklist

Copy link
Contributor

@JamesWTruherJamesWTruher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This looks great - do we need any additional validation, or is what we have sufficient?

@bergmeister
Copy link
CollaboratorAuthor

The manual end to end test (in vs code) is all I could as somehow this happens only when PSSA is hosted in the vs code extension where those command info cache entries got populated.

@bergmeisterbergmeister merged commitba7d01a intoPowerShell:masterJan 28, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@rjmholtrjmholtAwaiting requested review from rjmholt

1 more reviewer

@JamesWTruherJamesWTruherJamesWTruher approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

False positive: "is implicitly aliasing 'Get-..\..\Target.ps1'" on file path?

2 participants

@bergmeister@JamesWTruher

[8]ページ先頭

©2009-2025 Movatter.jp