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 logic errors in AvoidAlias rule#1251

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

@JamesWTruher
Copy link
Contributor

PR Summary

The first fix is that after the yield return, we should move on to the next command
The second fix is that if we findany command, we should not move on to the 'Get-' variant.
These changes mean that we do not run a pipeline (twice!) to find something that was a cache miss. Previously in the pathological case of a script made up of only unique aliases, we would run 2 pipelines for each found alias. This fix avoids both of those pipeline invocations.

PR Checklist

The first fix is that after the yield return, we should move on to the next commandThe second fix is that if we find _any_ command, we should not move on to the 'Get-<command>' variantThese changes mean that we do not run a pipeline (twice!) to find something that was a cache miss. In the pathological case of a script mmade up of only unique aliases, we would run 2 pipelines for each found alias.
Copy link
Collaborator

@bergmeisterbergmeister left a comment

Choose a reason for hiding this comment

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

One minor suggestion but looks great otherwise. I will modify PR#1178 to not parallelize the AvoidAlias rule any more since with this improvement the rule is no longer the weakest link in the chain

Co-Authored-By: Christoph Bergmeister [MVP] <c.bergmeister@gmail.com>
@JamesWTruherJamesWTruher merged commit9d19209 intoPowerShell:developmentJun 5, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@bergmeisterbergmeisterbergmeister approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@JamesWTruher@bergmeister

[8]ページ先頭

©2009-2025 Movatter.jp