X Tutup
The Wayback Machine - https://web.archive.org/web/20200918094503/https://github.com/PowerShell/PSScriptAnalyzer/pull/958
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

Make UseDeclaredVarsMoreThanAssignments not flag drive qualified variables #958

Conversation

@bergmeister
Copy link
Collaborator

bergmeister commented Apr 1, 2018

PR Summary

Fixes #631

The rule used to rely only on the SSA of the Helper class to determine if a variable was an environment variable, but SSA does not work well within function defitions.
Also, the rule only excluded the function PSDrive.
This PR changes it to not flag on any drive qualified variables at all.

PR Checklist

Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets. Please mark anything not applicable to this PR NA.

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • User facing documentation needed
  • Change is not breaking
  • Make sure you've added a new test if existing tests do not effectively test the code changed
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready
@bergmeister bergmeister removed the in progress label Apr 1, 2018
@bergmeister bergmeister requested a review from lzybkr Apr 1, 2018
@bergmeister bergmeister changed the title Make UseDeclaredVarsMoreThanAssignments not flag anything for drive qualified variables Make UseDeclaredVarsMoreThanAssignments not flag drive qualified variables Apr 1, 2018
@lzybkr
lzybkr approved these changes Apr 2, 2018
@bergmeister bergmeister merged commit 1a8d285 into PowerShell:development Apr 2, 2018
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
license/cla All CLA requirements met.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.
X Tutup