-
Notifications
You must be signed in to change notification settings - Fork 395
Improve documentation, especially about parameter usage and the settings file #968
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments
docs/markdown/Invoke-Formatter.md
Outdated
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe "in PowerShell Gallery" ?
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 PRNA
.NA
User facing documentation neededNA
Make sure you've added a new test if existing tests do not effectively test the code changedWIP:
to the beginning of the title and remove the prefix when the PR is ready