Open o-l-a-v opened 3 months ago
This does not happen if you have a file only containing:
Az.Monitor\Get-AzDataCollectionRuleAssociation
Thus:
VSCode settings.json contains: "powershell.codeFormatting.useCorrectCasing": true.
settings.json
"powershell.codeFormatting.useCorrectCasing": true
Create temp.ps1 with following content:
temp.ps1
Write-Information -MessageData 'Adding associations.' $DCRs | ForEach-Object -ThrottleLimit $DCRs.'Count' -Parallel { $null = Add-Member -InputObject $_ -MemberType 'NoteProperty' -Force -Name 'associations' -Value ( [array]( Az.Monitor\Get-AzDataCollectionRuleAssociation -SubscriptionId $_.'subscriptionId' ` -ResourceGroupName $_.'resourceGroup' -DataCollectionRuleName $_.'name' ) ) } 6>$null
Save. The content becomes:
Write-Information -MessageData 'Adding associations.' $DCRs | ForEach-Object -ThrottleLimit $DCRs.'Count' -Parallel { $null = Add-Member -InputObject $_ -MemberType 'NoteProperty' -Force -Name 'associations' -Value ( [array]( Get-AzDataCollectionRuleAssociation -SubscriptionId $_.'subscriptionId' ` -ResourceGroupName $_.'resourceGroup' -DataCollectionRuleName $_.'name' ) ) } 6>$null
Content should not change.
Az.Monitor\ gets stripped.
Az.Monitor\
Steps to reproduce
This does not happen if you have a file only containing:
Thus:
VSCode
settings.json
contains:"powershell.codeFormatting.useCorrectCasing": true
.Create
temp.ps1
with following content:Save. The content becomes:
Expected behavior
Content should not change.
Actual behavior
Az.Monitor\
gets stripped.Environment data