-
-
Notifications
You must be signed in to change notification settings - Fork 473
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
Standardize container name and type validation #2379
Conversation
@@ -306,7 +275,7 @@ | |||
function Write-PesterReport { | |||
param ( | |||
[Parameter(mandatory = $true, valueFromPipeline = $true)] | |||
$RunResult | |||
[Pester.Run] $RunResult |
Check warning
Code scanning / PSScriptAnalyzer
Command accepts pipeline input but has not defined a process block. Warning
@@ -85,7 +85,7 @@ | |||
#> | |||
param ( | |||
[parameter(Mandatory = $true, ValueFromPipeline = $true)] | |||
$Result, | |||
[Pester.Run] $Result, |
Check warning
Code scanning / PSScriptAnalyzer
Command accepts pipeline input but has not defined a process block. Warning
@@ -135,7 +135,7 @@ | |||
#> | |||
param ( | |||
[parameter(Mandatory = $true, ValueFromPipeline = $true)] | |||
$Result, | |||
[Pester.Run] $Result, |
Check warning
Code scanning / PSScriptAnalyzer
Command accepts pipeline input but has not defined a process block. Warning
@@ -147,7 +147,7 @@ | |||
function Export-XmlReport { | |||
param ( | |||
[parameter(Mandatory = $true, ValueFromPipeline = $true)] | |||
$Result, | |||
[Pester.Run] $Result, |
Check warning
Code scanning / PSScriptAnalyzer
Command accepts pipeline input but has not defined a process block. Warning
@@ -272,7 +272,7 @@ | |||
#> | |||
param ( | |||
[parameter(Mandatory = $true, ValueFromPipeline = $true)] | |||
$Result, | |||
[Pester.Run] $Result, |
Check warning
Code scanning / PSScriptAnalyzer
Command accepts pipeline input but has not defined a process block. Warning
@@ -362,7 +362,7 @@ | |||
#> | |||
param ( | |||
[parameter(Mandatory = $true, ValueFromPipeline = $true)] | |||
$Result, | |||
[Pester.Run] $Result, |
Check warning
Code scanning / PSScriptAnalyzer
Command accepts pipeline input but has not defined a process block. Warning
As always, thank you. |
PR Summary
This PR adds a
Name
-property to Container-objects to standardize naming currently set in multiple places.There was two variations in the codebase when container type was
File
:$Item.ToString()
which is FullName in PS7, but Name in Windows PowerShell$Item.FullName
After PR: Prefer
FullName
ifFileInfo
-object for consistency, elseToString()
.There was two variations in the codebase when the scriptblock was linked to a file:
<ScriptBlock>file:line
<ScriptBlock>:file:line
After PR:
<ScriptBlock>:file:line
PR also moves container type validation to property setter to avoid checking in multiple places.
PR Checklist
Create Pull Request
to mark it as a draft. PR can be markedReady for review
when it's ready.