X Tutup
The Wayback Machine - https://web.archive.org/web/20200918094658/https://github.com/PowerShell/PSScriptAnalyzer/pull/1073
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 parsing of empty hashtable when string is provided as settings object #1073

Conversation

@bergmeister
Copy link
Collaborator

bergmeister commented Sep 25, 2018

PR Summary

Fixes #1063 whereby parsing the settings hashtable fails when it is being provided as a string due to a helper method returning null instead of an empty list.

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
Copy link
Member

JamesWTruher left a comment

👍

@JamesWTruher
Copy link
Member

JamesWTruher commented Oct 3, 2018

it's curious, a malformed file will still be accepted, I created a file:

@{ ExcludeRules = @()

not sure what to do about it though

@bergmeister
Copy link
Collaborator Author

bergmeister commented Oct 3, 2018

@JamesWTruher This is due to issue #1053. Using the -Verbose switch, one can at least get the information out that parsing failed but it is basically a problem of the initial design that should be fixed with a separate refactoring (that would be more involved)

@JamesWTruher JamesWTruher merged commit 0d81244 into PowerShell:development Oct 3, 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