-
Notifications
You must be signed in to change notification settings - Fork 406
Open
Labels
Description
PSUseCorrectCasing is erroneously changing Type to type in a DSC configuration.
Steps to reproduce
$settings = @{
IncludeRules = @("PSUseCorrectCasing")
Rules = @{
PSUseCorrectCasing = @{
Enable = $true
}
}
}
Invoke-Formatter -Settings $settings -ScriptDefinition @'
Configuration ApacheServer{
Node localhost{
nxFile vHostDirectory{
DestinationPath = $VhostDir
Type = "Directory"
Ensure = "Present"
Owner = "root"
Mode = "744"
}
}
}
'@Expected behavior
Configuration ApacheServer{
Node localhost{
nxFile vHostDirectory{
DestinationPath = $VhostDir
Type = "Directory"
Ensure = "Present"
Owner = "root"
Mode = "744"
}
}
}
Actual behavior
Configuration ApacheServer{
Node localhost{
nxFile vHostDirectory{
DestinationPath = $VhostDir
type = "Directory"
Ensure = "Present"
Owner = "root"
Mode = "744"
}
}
}
Environment data
> $PSVersionTable
PSVersion 7.0.0
PSEdition Core
GitCommitId 7.0.0
OS Microsoft Windows 10.0.18363
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
> (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }
1.19.0
1.18.3