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

Fix regression caused by PR #963 during development of PSSA 1.18.0 whereby PSAvoidUsingPositionalParameters was not taking aliases into account any more #1175

Conversation

bergmeister
Copy link
Collaborator

PR Summary

Fix regression caused by PR #963 during development of PSSA 1.18.0 whereby PSAvoidUsingPositionalParameters was not taking alias into account any more.
Also allow CommandTypes.ExternalScript types as they can have paramters as well. Since only PowerShell Core ships with ExternalScripts but they have less than 3 parameters, it was hard to write a test for that case.

Thanks for spotting this @Jaykul

PR Checklist

@bergmeister bergmeister merged commit dfea64a into PowerShell:development Mar 15, 2019
bergmeister added a commit to bergmeister/PSScriptAnalyzer that referenced this pull request Mar 22, 2019
… 1.18.0 whereby PSAvoidUsingPositionalParameters was not taking aliases into account any more (PowerShell#1175)

* Allow aliases or external script definitions as well so that positionalparameters triggers on them as well

* add test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants