Skip to content

Commit

Permalink
Fix ScriptAnalyzer warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju committed Jul 12, 2024
1 parent 6fd9fd9 commit 60ea8d1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 11 deletions.
8 changes: 1 addition & 7 deletions source/Private/Get-AstDefinition.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,7 @@
Retrieves the ScriptBlockAst definition of the 'Script.ps1' file.
.EXAMPLE
'C:\Scripts\Script.ps1' | Get-AstDefinition
Retrieves the ScriptBlockAst definition of the 'Script.ps1' file using
pipeline input.
.EXAMPLE
Get-ChildItem -Path './scripts' | Get-AstDefinition
Get-AstDefinition -Path (Get-ChildItem -Path './scripts')
Retrieves the ScriptBlockAst definition of all the files in the path pass
as pipeline input.
Expand Down
2 changes: 1 addition & 1 deletion source/Private/Get-CommandAst.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Specifies the PowerShell command for which to retrieve the AST.
.EXAMPLE
Get-CommandAst -Command 'Should'
Get-CommandAst -CommandName 'Should'
This example retrieves the AST of the 'Should' command.
Expand Down
2 changes: 1 addition & 1 deletion source/Private/Get-PesterCommandParameter.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
.EXAMPLE
$commandAst = [System.Management.Automation.Language.Parser]::ParseInput('Should -Be "ExpectedString" "BecauseString" "ActualString"')
Get-PesterCommandParameter -CommandAst $commandAst -IgnoreParameter 'Be', 'Not' -PositionalParameter 'ExpectedValue', 'Because', 'ActualValue'
Get-PesterCommandParameter -CommandAst $commandAst -CommandName 'Should' -IgnoreParameter @('Be', 'Not') -PositionalParameter @('ExpectedValue', 'Because', 'ActualValue')
Returns a hashtable with the parameters.
#>
Expand Down
2 changes: 1 addition & 1 deletion source/Private/Get-PesterCommandSyntaxVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
.EXAMPLE
$ast = [System.Management.Automation.Language.Parser]::ParseInput('Should -BeExactly "value"', [ref]$null, [ref]$null)
Get-PesterCommandSyntaxVersion -CommandAst $ast -CommandName 'Should' -ParameterName 'BeExactly'
Get-PesterCommandSyntaxVersion -CommandAst $ast
Returns the syntax version for the 'Should -BeExactly' command.
#>
Expand Down
2 changes: 1 addition & 1 deletion source/Public/Convert-PesterSyntax.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
Converts the syntax of the Test.ps1 file to Pester 6 syntax.
.EXAMPLE
Get-ChildItem -Path "C:\Scripts" -Recurse -Filter "*.ps1" | Convert-PesterSyntax
Get-ChildItem -Path "C:\Scripts" -Recurse -Filter "*.ps1" | Convert-PesterSyntax -Pester6
Converts the syntax of all PowerShell files in the C:\Scripts directory and
its subdirectories to the default (newest) Pester syntax.
Expand Down

0 comments on commit 60ea8d1

Please sign in to comment.