FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix typo in example by Farwaykorse · Pull Request #1379 · PowerShell/PSScriptAnalyzer · GitHub

Fix typo in example - #1379

Merged
Christoph Bergmeister (bergmeister) merged 2 commits into
PowerShell:masterfrom
Farwaykorse:patch-2
Dec 3, 2019
Merged

Fix typo in example#1379
Christoph Bergmeister (bergmeister) merged 2 commits into
PowerShell:masterfrom
Farwaykorse:patch-2

Conversation

Copy link
Copy Markdown
Contributor

Correct the script name to match the name in the example.

Removed the when using. It belonged with the when using Invoke-ScriptAnalyzer used in the previous example and repeating that seems unnecessary.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for making it consistent.
I am happy with the proposed change but I think we could improve it further by making 2 more changes:

  • Use the full parameter name, which is -Settings in both examples
  • Replace PSScriptAnalyzerSettings.psd1 in the 2 examples with $PSScriptAnalyzerSettingsPath. This is because using -Settings PSScriptAnalyzerSettings.psd1 is redundant due to the implicit settings feature.

Let me know what you think.

Copy link
Copy Markdown
Contributor Author

I agree with the use of -Settings.

I wouldn't use the variable, it just adds confusion over the meaning of the variable.
e.g. When you wrote it, my first assumption was that it was a variable defined by PSScriptAnalyzer.

The current use of PSScriptAnalyzerSettings.psd1 as a filename shows the examples as they apply to both the implicit use and by user supplied path.

Copy link
Copy Markdown
Collaborator

Ok, happy with that as well, it is definitely an improvement. Thanks 😀

Christoph Bergmeister (bergmeister) merged commit 20c4611 into PowerShell:master Dec 3, 2019
Farwaykorse deleted the patch-2 branch December 3, 2019 21:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL