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

Improve documentation, especially about parameter usage and the settings file #968

Merged
merged 3 commits into from Apr 23, 2018

Conversation

@bergmeister
Copy link
Collaborator

bergmeister commented Apr 10, 2018

PR Summary

Closes #675

Improve documentation, especially about parameter usage and the settings file.
Improve newlines (add/remove where appropriate.

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
  • NA User facing documentation needed
  • Change is not breaking
  • [] NA 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 added this to the 1.17 milestone Apr 10, 2018
@bergmeister bergmeister self-assigned this Apr 10, 2018
@bergmeister bergmeister requested a review from JamesWTruher Apr 10, 2018
@bergmeister bergmeister added in progress and removed in progress labels Apr 10, 2018
@bergmeister bergmeister mentioned this pull request Apr 10, 2018
4 of 7 tasks complete
@kalgiz
kalgiz approved these changes Apr 13, 2018
Copy link
Contributor

kalgiz left a comment

Minor comments

@@ -15,7 +15,7 @@ Invoke-Formatter [-ScriptDefinition] <String> [-Settings <object>] [-Range <int[

## DESCRIPTION

The `Invoke-Formatter` cmdlet takes a string parameter named `ScriptDefinition` and formats it according to the input settings parameter `Settings`. If no `Settings` parameter is provided, the cmdlet assumes the default code formatting settings as defined in `Settings/CodeFormatting.psd`.
The Invoke-Formatter cmdlet takes a string parameter named ScriptDefinition and formats it according to the input settings parameter Settings. If no Settings parameter is provided, the cmdlet assumes the default code formatting settings as defined in Settings/CodeFormatting.psd1.

This comment has been minimized.

@kalgiz

kalgiz Apr 13, 2018 Contributor

Please remove extra space in "according to the input" part.

@@ -219,7 +207,7 @@ Accept wildcard characters: False
```

### -CustomRulePath
Adds the custom rules defined in the specified paths to the analysis.
Uses only the custom rules defined in the specified paths to the analysis. To still use the built-in rules, additionally use the -IncludeDefaultRules switch.

This comment has been minimized.

@kalgiz

kalgiz Apr 13, 2018 Contributor

maybe just "add the -IncludeDefaultRules switch" instead of "additionally use the -IncludeDefaultRules switch" to not repeat word "use" ?

@@ -502,7 +500,7 @@ Accept wildcard characters: False
### -SaveDscDependency
Resolve DSC resource dependency

Whenever Invoke-ScriptAnalyzer (isa) is run on a script having the dynamic keyword "Import-DSCResource -ModuleName <somemodule>", if <somemodule> is not present in any of the PSModulePath, isa gives parse error. This error is caused by the powershell parser not being able to find the symbol for <somemodule>. If isa finds the module on PowerShell Gallery (www.powershellgallery.com) then it downloads the missing module to a temp path. The temp path is then added to PSModulePath only for duration of the scan. The temp location can be found in $LOCALAPPDATA/PSScriptAnalyzer/TempModuleDir.
Whenever Invoke-ScriptAnalyzer is run on a script having the dynamic keyword "Import-DSCResource -ModuleName <somemodule>", if <somemodule> is not present in any of the PSModulePath, Invoke-ScriptAnalyzer gives parse error. This error is caused by the powershell parser not being able to find the symbol for <somemodule>. If Invoke-ScriptAnalyzer finds the module on PowerShell Gallery (www.powershellgallery.com) then it downloads the missing module to a temp path. The temp path is then added to PSModulePath only for duration of the scan. The temp location can be found in $LOCALAPPDATA/PSScriptAnalyzer/TempModuleDir.

This comment has been minimized.

@kalgiz

kalgiz Apr 13, 2018 Contributor

maybe "in PowerShell Gallery" ?

bergmeister added 2 commits Apr 14, 2018
@JamesWTruher JamesWTruher merged commit 0e7cca6 into PowerShell:development Apr 23, 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.

3 participants
You can’t perform that action at this time.